﻿<cfcomponent name="globalpool" ExtDirect="true">
	
<cffunction name="fetch" ExtDirect="true">
<cfargument name="referencecodelist" >

<!--- Temp to be replaced during patching --->

<!---<CFMODULE TEMPLATE="../../../common/autogenfield.cfm" ---> 
<cfset autogenpath = "../../../../ibosesvn/common/autogenfield.cfm"  >

<!---End  Temp to be replaced during patching --->
	
	<cfset FIRSTNAME         = "">
    <cfset MIDDLENAME        = "">  
    <cfset LASTNAME          = "">                      
    <cfset PAGIBIGNUMBER     = "">
    <cfset SSSNUMBER         = "">
    <cfset TINNUMBER         = "">
    <cfset LANDLINENUMBER    = "">  
    <cfset COMPANYCODE       = "">
    <cfset CELLPHONENUMBER   = "">
    <cfset EMAILADDRESS      = "">
    <cfset REFERENCECODE     = "">
	<cfset REFERENCECODE     = "">
    <cfset SUFFIX            = "">
	<cfset LASTNAME          = "">
	<cfset FIRSTNAME         = "">
	<cfset MIDDLENAME        = "">
	<cfset DATEOFAPPLICATION = "">
    <cfset POSITIONFIRSTPRIORITY = "">
    <cfset SOURCEEMPLOYMENT  = "">
    <cfset SOURCEOTHERVALUE  = "">
    <cfset SOURCEJOBFAIRWHERE= "">
    <cfset SOURCEJOBFAIRDATE = "">
    <cfset SOURCEREFERREDBY  = "">
    <cfset PAGIBIGNUMBER     = "">
	<cfset SSSNUMBER         = "">
	<cfset EXPECTEDSALARY    = 0>
	<cfset TINNUMBER         = "">
	<cfset EMAILADDRESS      = ""> 
    <cfset CURRENTSALARY     = 0> 
	<cfset PRESENTADDRESSPOSTAL = "">
    <cfset PROVINCIALADDRESSPOSTAL = "">
	<cfset DATEOFBIRTH       = "#dateformat(now(), 'YYYY-MM-DD')#">
    <cfset PLACEOFBIRTH      = "">
    <cfset AGE               = 0>
    <cfset GENDER  			 = "">
    <cfset CIVILSTATUS       = "">
	<cfset CITIZENSHIP       = "">
	<cfset RELIGION          = "">
	<cfset CELLPHONENUMBER   = "">
	<cfset LANDLINENUMBER    = "">
	<cfset EMAILADDRESS      = ""> 
    <cfset HEIGHT            = "">
    <cfset WEIGHT            = "">
    <cfset LANGUAGESPOKEN    = "">
	<cfset INCASEEMERNAME    = "">					
    <cfset INCASEEMERRELATION= "">
    <cfset INCASEEMERTELNUM  = "">
    <cfset INCASEEMERCELLNUM = "">  
    <cfset PRESENTADDRESSOWN = "">
    <cfset PROVINCEADDRESSOWN= "">
	<cfset POSITIONFIRSTPRIORITY   = "">
	<cfset POSITIONSECONDPRIORITY  = "">
    <cfset POSITIONTHIRDPRIORITY   = "">
    <cfset COMPANYFIRSTPRIORITY    = "">
	<cfset COMPANYSECONDPRIORITY   = "">
    <cfset COMPANYTHIRDPRIORITY    = "">
	<cfset FATHERFULLNAME       = "">
	<cfset FATHERAGE            = 0>
	<cfset FATHEROCCUPATION     = "">
	<cfset FATHERCOMPANY        = "">
	<cfset FATHERCONTACTNO      = ""> 
    
    <cfset MOTHERFULLNAME       = "">
	<cfset MOTHERAGE            = 0>
	<cfset MOTHEROCCUPATION     = "">
	<cfset MOTHERCOMPANY        = "">
	<cfset MOTHERCONTACTNO      = "">    
    
    <cfset SPOUSEFULLNAME       = "">
	<cfset SPOUSEAGE            = 0>
	<cfset SPOUSEOCCUPATION     = "">
	<cfset SPOUSECOMPANY        = "">
	<cfset SPOUSECONTACTNO      = ""> 
    
    <cfset FIRSTCHILDFULLNAME   = "">
	<cfset FIRSTCHILDAGE        = 0>
	<cfset FIRSTCHILDOCCUPATION = "">
	<cfset FIRSTCHILDCOMPANY    = "">
	<cfset FIRSTCHILDCONTACTNO  = ""> 
	        
    <cfset SECONDCHILDFULLNAME  = "">
	<cfset SECONDCHILDAGE       = 0>
	<cfset SECONDCHILDOCCUPATION= "">
	<cfset SECONDCHILDCOMPANY   = "">
	<cfset SECONDCHILDCONTACTNO = ""> 
    
    <cfset THIRDCHILDFULLNAME   = "">
	<cfset THIRDCHILDAGE        = 0>
	<cfset THIRDCHILDOCCUPATION = "">
	<cfset THIRDCHILDCOMPANY    = "">
	<cfset THIRDCHILDCONTACTNO  = ""> 
    
    <cfset FOURTHCHILDFULLNAME  = "">
	<cfset FOURTHCHILDAGE       = 0>
	<cfset FOURTHCHILDOCCUPATION= "">
	<cfset FOURTHCHILDCOMPANY   = "">
	<cfset FOURTHCHILDCONTACTNO = ""> 
    
    <cfset FIFTHCHILDFULLNAME   = "">
	<cfset FIFTHCHILDAGE        = 0>
	<cfset FIFTHCHILDOCCUPATION = "">
	<cfset FIFTHCHILDCOMPANY    = "">
	<cfset FIFTHCHILDCONTACTNO  = ""> 
    
    <cfset FIRSTBROFULLNAME     = "">
	<cfset FIRSTBROAGE          = 0>
	<cfset FIRSTBROOCCUPATION   = "">
	<cfset FIRSTBROCOMPANY      = "">
	<cfset FIRSTBROCONTACTNO    = ""> 
    
    <cfset SECONDBROFULLNAME    = "">
	<cfset SECONDBROAGE         = 0>
	<cfset SECONDBROOCCUPATION  = "">
	<cfset SECONDBROCOMPANY     = "">
	<cfset SECONDBROCONTACTNO   = "">
    
    <cfset THIRDBROFULLNAME     = "">
	<cfset THIRDBROAGE          = 0>
	<cfset THIRDBROOCCUPATION   = "">
	<cfset THIRDBROCOMPANY      = "">
	<cfset THIRDBROCONTACTNO    = ""> 
    
    <cfset FOURTHBROFULLNAME    = "">
	<cfset FOURTHBROAGE         = 0>
	<cfset FOURTHBROOCCUPATION  = "">
	<cfset FOURTHBROCOMPANY     = "">
	<cfset FOURTHBROCONTACTNO   = ""> 
    
    <cfset FIFTHBROFULLNAME     = "">
	<cfset FIFTHBROAGE          = 0>
	<cfset FIFTHBROOCCUPATION   = "">
	<cfset FIFTHBROCOMPANY      = "">
	<cfset FIFTHBROCONTACTNO    = ""> 
			
	<cfset SIXTHCHILDFULLNAME    = "">
    <cfset SIXTHCHILDAGE    = "0">
    <cfset SIXTHCHILDOCCUPATION    = "">
    <cfset SIXTHCHILDCOMPANY    = "">
    <cfset SIXTHCHILDCONTACTNO    = "">
    <cfset SEVENTHCHILDFULLNAME    = "">
    <cfset SEVENTHCHILDAGE    = "0">
    <cfset SEVENTHCHILDOCCUPATION    = "">
    <cfset SEVENTHCHILDCOMPANY    = "">
    <cfset SEVENTHCHILDCONTACTNO    = "">
    <cfset EIGHTHCHILDFULLNAME    = "">
    <cfset EIGHTHCHILDAGE    = "0">
    <cfset EIGHTHCHILDOCCUPATION    = "">
    <cfset EIGHTHCHILDCOMPANY    = "">
    <cfset EIGHTHCHILDCONTACTNO    = "">
    <cfset NINTHCHILDFULLNAME    = "">
    <cfset NINTHCHILDAGE    = "0">
    <cfset NINTHCHILDOCCUPATION    = "">
    <cfset NINTHCHILDCOMPANY    = "">
    <cfset NINTHCHILDCONTACTNO    = "">
    <cfset TENTHCHILDFULLNAME    = "">
    <cfset TENTHCHILDAGE    = "0">
    <cfset TENTHCHILDOCCUPATION    = "">
    <cfset TENTHCHILDCOMPANY    = "">
    <cfset TENTHCHILDCONTACTNO    = "">
    <cfset ELEVENTHCHILDFULLNAME    = "">
    <cfset ELEVENTHCHILDAGE    = "0">
    <cfset ELEVENTHCHILDOCCUPATION    = "">
    <cfset ELEVENTHCHILDCOMPANY    = "">
    <cfset ELEVENTHCHILDCONTACTNO    = "">
    <cfset TWELVECHILDFULLNAME    = "">
    <cfset TWELVECHILDAGE    = "0">
    <cfset TWELVECHILDOCCUPATION    = "">
    <cfset TWELVECHILDCOMPANY    = "">
    <cfset TWELVECHILDCONTACTNO    = "">
    <cfset THIRTEENTHCHILDFULLNAME    = "">
    <cfset THIRTEENTHCHILDAGE    = "0">
    <cfset THIRTEENTHCHILDOCCUPATION    = "">
    <cfset THIRTEENTHCHILDCOMPANY    = "">
    <cfset THIRTEENTHCHILDCONTACTNO    = "">
    <cfset FOURTEENTHCHILDFULLNAME    = "">
    <cfset FOURTEENTHCHILDAGE    = "0">
    <cfset FOURTEENTHCHILDOCCUPATION    = "">
    <cfset FOURTEENTHCHILDCOMPANY    = "">
    <cfset FOURTEENTHCHILDCONTACTNO    = "">
    <cfset FIFTEENTHCHILDFULLNAME    = "">
    <cfset FIFTEENTHCHILDAGE    = "0">
    <cfset FIFTEENTHCHILDOCCUPATION    = "">
    <cfset FIFTEENTHCHILDCOMPANY    = "">
    <cfset FIFTEENTHCHILDCONTACTNO    = "">
	
	<cfset SIXTHBROFULLNAME    = "">
    <cfset SIXTHBROAGE    = "0">
    <cfset SIXTHBROOCCUPATION    = "">
    <cfset SIXTHBROCOMPANY    = "">
    <cfset SIXTHBROCONTACTNO    = "">
    <cfset SEVENTHBROFULLNAME    = "">
    <cfset SEVENTHBROAGE    = "0">
    <cfset SEVENTHBROOCCUPATION    = "">
    <cfset SEVENTHBROCOMPANY    = "">
    <cfset SEVENTHBROCONTACTNO    = "">
    <cfset EIGHTHBROFULLNAME    = "">
    <cfset EIGHTHBROAGE    = "0">
    <cfset EIGHTHBROOCCUPATION    = "">
    <cfset EIGHTHBROCOMPANY    = "">
    <cfset EIGHTHBROCONTACTNO    = "">
    <cfset NINTHBROFULLNAME    = "">
    <cfset NINTHBROAGE    = "0">
    <cfset NINTHBROOCCUPATION    = "">
    <cfset NINTHBROCOMPANY    = "">
    <cfset NINTHBROCONTACTNO    = "">
    <cfset TENTHBROFULLNAME    = "">
    <cfset TENTHBROAGE    = "0">
    <cfset TENTHBROOCCUPATION    = "">
    <cfset TENTHBROCOMPANY    = "">
    <cfset TENTHBROCONTACTNO    = "">
    <cfset ELEVENTHBROFULLNAME    = "">
    <cfset ELEVENTHBROAGE    = "0">
    <cfset ELEVENTHBROOCCUPATION    = "">
    <cfset ELEVENTHBROCOMPANY    = "">
    <cfset ELEVENTHBROCONTACTNO    = "">
    <cfset TWELVEBROFULLNAME    = "">
    <cfset TWELVEBROAGE    = "0">
    <cfset TWELVEBROOCCUPATION    = "">
    <cfset TWELVEBROCOMPANY    = "">
    <cfset TWELVEBROCONTACTNO    = "">
    <cfset THIRTEENTHBROFULLNAME    = "">
    <cfset THIRTEENTHBROAGE    = "0">
    <cfset THIRTEENTHBROOCCUPATION    = "">
    <cfset THIRTEENTHBROCOMPANY    = "">
    <cfset THIRTEENTHBROCONTACTNO    = "">
    <cfset FOURTEENTHBROFULLNAME    = "">
    <cfset FOURTEENTHBROAGE    = "0">
    <cfset FOURTEENTHBROOCCUPATION    = "">
    <cfset FOURTEENTHBROCOMPANY    = "">
    <cfset FOURTEENTHBROCONTACTNO    = "">
    <cfset FIFTEENTHBROFULLNAME    = "">
    <cfset FIFTEENTHBROAGE    = "0">
    <cfset FIFTEENTHBROOCCUPATION    = "">
    <cfset FIFTEENTHBROCOMPANY    = "">
    <cfset FIFTEENTHBROCONTACTNO    = "">
	
	
	 
	<cfset POSTGRADSCHOOL     = "">
	<cfset COLLEGESCHOOL      = "">
	<cfset VOCATIONALSCHOOL   = "">
	<cfset SECONDARYSCHOOL    = "">
	
    <cfset POSTGRADCOURSE     = "">
	<cfset COLLEGECOURSE      = "">
	<cfset VOCATIONALCOURSE   = "">
	<cfset SECONDARYCOURSE    = "">
    
	<cfset POSTGRADFIELD      = "">
	<cfset COLLEGEFIELD       = "">
	<cfset VOCATIONALFIELD    = "">
	<cfset SECONDARYFIELD     = "">
			
	<cfset POSTGRADFROM       = "#dateformat(now(), 'YYYY-MM-DD')#">
	<cfset COLLEGEFROM        = "#dateformat(now(), 'YYYY-MM-DD')#">
	<cfset VOCATIONALFROM     = "#dateformat(now(), 'YYYY-MM-DD')#">
	<cfset SECONDARYFROM      = "#dateformat(now(), 'YYYY-MM-DD')#">
	
	<cfset POSTGRADTO         = "#dateformat(now(), 'YYYY-MM-DD')#">
	<cfset COLLEGETO          = "#dateformat(now(), 'YYYY-MM-DD')#">
	<cfset VOCATIONALTO       = "#dateformat(now(), 'YYYY-MM-DD')#">     
    <cfset SECONDARYTO        = "#dateformat(now(), 'YYYY-MM-DD')#">
	
	<cfset POSTGRADISGRAD     = "">
	<cfset COLLEGEISGRAD      = "">
	<cfset VOCATIONALISGRAD   = "">
	<cfset SECONDARYISGRAD    = "">
	
	<cfset POSTGRADHONORS     = "">
	<cfset COLLEGEHONORS      = "">
	<cfset VOCATIONALHONORS   = "">
	<cfset SECONDARYHONORS    = "">
	<cfset FIRSTEXTRAORGNAME        = "">
	<cfset FIRSTEXTRAORGIDATE       = "">
	<cfset FIRSTEXTRAORGHIGHPOSHELD = "">
    <cfset SECONDEXTRAORGNAME       = "">
	<cfset SECONDEXTRAORGIDATE      = "">
	<cfset SECONDEXTRAORGHIGHPOSHELD= "">
    <cfset THIRDEXTRAORGNAME        = "">
	<cfset THIRDEXTRAORGIDATE       = "">
	<cfset THIRDEXTRAORGHIGHPOSHELD = "">
    <cfset FOURTHEXTRAORGNAME       = "">
	<cfset FOURTHEXTRAORGIDATE      = "">
	<cfset FOURTHEXTRAORGHIGHPOSHELD= "">
    <cfset FIFTHEXTRAORGNAME        = "">
	<cfset FIFTHEXTRAORGIDATE       = "">
	<cfset FIFTHEXTRAORGHIGHPOSHELD = "">
	<cfset FIRSTGOVEXAMPASSED = "">
	<cfset FIRSTGOVEXAMDATE   = "">
    <cfset FIRSTGOVEXAMRATING = "">
	
    <cfset SECONDGOVEXAMPASSED= "">
	<cfset SECONDGOVEXAMDATE  = "">
    <cfset SECONDGOVEXAMRATING= "">

	<cfset THIRDGOVEXAMPASSED = "">
	<cfset THIRDGOVEXAMDATE   = "">
    <cfset THIRDGOVEXAMRATING = "">
	
	<cfset FOURTHGOVEXAMPASSED= "">
	<cfset FOURTHGOVEXAMDATE  = "">
    <cfset FOURTHGOVEXAMRATING= "">
	<cfset BOARDEXAMRESULT    = "">
	<cfset LICENSECERT        = "">
    
	<cfset BLOODTYPE                 = "">
	<cfset FIRSTSEMINARTOPIC         = "">
	<cfset FIRSTSEMINARDATE          = "">
	<cfset FIRSTSEMINARORGANIZER     = "">
	
    <cfset SECONDSEMINARTOPIC        = "">
	<cfset SECONDSEMINARDATE         = "">
	<cfset SECONDSEMINARORGANIZER    = "">
    
    <cfset THIRDSEMINARTOPIC         = "">
	<cfset THIRDSEMINARDATE          = "">
	<cfset THIRDSEMINARORGANIZER     = "">
    
    <cfset FOURTHSEMINARTOPIC        = "">
	<cfset FOURTHSEMINARDATE         = "">
	<cfset FOURTHSEMINARORGANIZER    = "">
    
    <cfset FIFTHSEMINARTOPIC         = "">
	<cfset FIFTHSEMINARDATE          = "">
	<cfset FIFTHSEMINARORGANIZER     = "">
    
    <cfset SIXTHSEMINARTOPIC         = "">
	<cfset SIXTHSEMINARDATE          = "">
	<cfset SIXTHSEMINARORGANIZER     = "">

	<cfset FIRSTEMPHISTORYNAME          = "">	
	<cfset FIRSTEMPHISTORYADDRESS       = "">	
    
    <cfset FIRSTEMPHISTORYPOSITION      = "">
    <cfset FIRSTEMPHISTORYCONTACTNO     = "">
    
  	<cfset FIRSTEMPHISTORYDATEEMP       = "">
    <cfset FIRSTEMPHISTORYDATESEP       = "">
    <cfset FIRSTEMPHISTORYINISALARY     = "0">
	<cfset FIRSTEMPHISTORYLASTSALARY    = "0">
	<cfset FIRSTEMPHISTORYLASTPOS       = "">
	<cfset FIRSTEMPHISTORYSUPERIOR      = "">
	<cfset FIRSTEMPHISTORYLEAVEREASONS  = "">
    

	<cfset SECONDEMPHISTORYNAME         = "">	
	<cfset SECONDEMPHISTORYADDRESS      = "">	
  	
	<cfset SECONDEMPHISTORYPOSITION     = "">
    <cfset SECONDEMPHISTORYCONTACTNO    = "">
    
	<cfset SECONDEMPHISTORYDATEEMP       = "">
    <cfset SECONDEMPHISTORYDATESEP       = "">
    <cfset SECONDEMPHISTORYINISALARY     = "0">
	<cfset SECONDEMPHISTORYLASTSALARY    = "0">
	<cfset SECONDEMPHISTORYLASTPOS       = "">
	<cfset SECONDEMPHISTORYSUPERIOR      = "">
	<cfset SECONDEMPHISTORYLEAVEREASONS  = "">
 

	<cfset THIRDEMPHISTORYNAME          = "">	
	<cfset THIRDEMPHISTORYADDRESS       = "">	
  	
	<cfset THIRDEMPHISTORYPOSITION      = "">
    <cfset THIRDEMPHISTORYCONTACTNO     = "">
	
	<cfset THIRDEMPHISTORYDATEEMP       = "">
    <cfset THIRDEMPHISTORYDATESEP       = "">
    <cfset THIRDEMPHISTORYINISALARY     = 0>
	<cfset THIRDEMPHISTORYLASTSALARY    = 0>
	<cfset THIRDEMPHISTORYLASTPOS       = "">
	<cfset THIRDEMPHISTORYSUPERIOR      = "">
	<cfset THIRDEMPHISTORYLEAVEREASONS  = "">


	<cfset FOURTHEMPHISTORYNAME          = "">	
	<cfset FOURTHEMPHISTORYADDRESS       = "">	
  	
	<cfset FOURTHEMPHISTORYPOSITION      = "">
    <cfset FOURTHEMPHISTORYCONTACTNO     = "">
	
	<cfset FOURTHEMPHISTORYDATEEMP       = "">
    <cfset FOURTHEMPHISTORYDATESEP       = "">
    <cfset FOURTHEMPHISTORYINISALARY     = 0>
	<cfset FOURTHEMPHISTORYLASTSALARY    = 0>
	<cfset FOURTHEMPHISTORYLASTPOS       = "">
	<cfset FOURTHEMPHISTORYSUPERIOR      = "">
	<cfset FOURTHEMPHISTORYLEAVEREASONS  = "">


	<cfset FIFTHEMPHISTORYNAME          = "">	
	<cfset FIFTHEMPHISTORYADDRESS       = "">	
  	
	<cfset FIFTHEMPHISTORYPOSITION      = "">
    <cfset FIFTHEMPHISTORYCONTACTNO     = "">
	
	<cfset FIFTHEMPHISTORYDATEEMP       = "">
    <cfset FIFTHEMPHISTORYDATESEP       = "">
    <cfset FIFTHEMPHISTORYINISALARY     = 0>
	<cfset FIFTHEMPHISTORYLASTSALARY    = 0>
	<cfset FIFTHEMPHISTORYLASTPOS       = "">
	<cfset FIFTHEMPHISTORYSUPERIOR      = "">
	<cfset FIFTHEMPHISTORYLEAVEREASONS  = "">

	<cfset RELWORKINNAMEONE           = "">	
    <cfset RELWORKINCOMPONE           = "">	
    <cfset RELWORKINAFINITYONE        = "">
    
    <cfset RELWORKINNAMETWO           = "">	
    <cfset RELWORKINCOMPTWO           = "">	
    <cfset RELWORKINAFINITYTWO        = "">
    
    <cfset RELWORKINNAMETHREE           = "">	
    <cfset RELWORKINCOMPTHREE           = "">	
    <cfset RELWORKINAFINITYTHREE        = "">

            
    <cfset SPECIALSKILLSONE           = "">	
    <cfset SPECIALSKILLSYEARSPONE     = 0>	
    <cfset SPECIALSKILLSLEVELONE      = "">

    <cfset SPECIALSKILLSTWO           = "">	
    <cfset SPECIALSKILLSYEARSPTWO     = 0>	
    <cfset SPECIALSKILLSLEVELTWO      = "">

    <cfset SPECIALSKILLSTHREE           = "">	
    <cfset SPECIALSKILLSYEARSPTHREE     = 0>	
    <cfset SPECIALSKILLSLEVELTHREE      = "">

    <cfset SPECIALSKILLSFOUR           = "">	
    <cfset SPECIALSKILLSYEARSPFOUR     = 0>	
    <cfset SPECIALSKILLSLEVELFOUR      = "">
    
    <cfset SPECIALSKILLSFIVE           = "">	
    <cfset SPECIALSKILLSYEARSPFIVE     = 0>	
    <cfset SPECIALSKILLSLEVELFIVE      = "">
    
	<cfset REFERENCENAME1 = "">
    <cfset REFERENCENAME2 = "">
    <cfset REFERENCENAME3 = "">
    
    <cfset REFERENCEOCCUPATION1 = "">
    <cfset REFERENCEOCCUPATION2 = "">
    <cfset REFERENCEOCCUPATION3 = "">
    
    <cfset REFERENCECOMPANY1 = "">
    <cfset REFERENCECOMPANY2 = "">
    <cfset REFERENCECOMPANY3 = "">
    
    <cfset REFERENCECONTACT1 = "">
    <cfset REFERENCECONTACT2 = "">
    <cfset REFERENCECONTACT3 = "">

    <cfset HASPHYSICALDEFFECTS           = "">	
    <cfset HASPHYSICALDEFFECTSNATURE     = "">
    
    <cfset HASOPILLNESS       			 = "">
    <cfset HASOPILLNESSNATURE      		 = "">
    
    <cfset HASDRUGSENSITIVE      		 = "">
    <cfset HASDRUGSENSITIVENATURE      	 = "">
    
    <cfset HASENGAGEDRUGS      			 = "">
    <cfset HASENGAGEDRUGSNATURE      	 = "">
    
    <cfset HASINVOLVEBUSI      			 = "">
    <cfset HASINVOLVEBUSINATURE      	 = "">
    
    <cfset HASSUSPENDED     		     = "">
    <cfset HASSUSPENDEDNATURE      		 = "">
    
    <cfset HASCRIMINAL      			 = "">
    <cfset HASCRIMINALNATURE      	     = "">
	
	<cfset PHOTOIDNAME      	     = "">
    
    <cfset PHILHEALTHNUMBER      	     = "">
    
    <cfset PREVEMPLOYED = ''>
    <cfset PREVAPPLIED = ''>
    <cfset DATEAVAILEMP = ''>

<!---End initialization--->




 
<cfset myList = referencecodelist />
<cfset count = ListLen(myList, "~", "no") /> 

<cfset messageback = myList >
<cfloop index="countme" from="1" to="#count#"> 

<cftry>

<!---Generate GUID --->
	<cfset listvaluehere = ListGetAt(myList, countme, "~", "no")>


	<cfset sValue = listvaluehere >

	<!---<cfif len(listvaluehere) GT 30 >--->
	
		 <CFMODULE TEMPLATE="#autogenpath#"              
                SEEDKEY="GI"    
                CODELENGTH="20"
                COLUMNNAME="GUID"    
                TABLENAME_FK="GMFPEOPLE"
                datasource="#client.global_dsn#"
                WITHDATE="Y">  
                <CFSET sValue=AUTOGENVALUE>
	<!---<cfelse>
	<CFSET sValue= listvaluehere>
	</cfif>--->
    
     <!---check if guid already exist--->
    <cfinvoke component="datafetcher"
              method="isGuidUsed"
              returnvariable="status"
              idtocheck="#sValue#"
              datasource="#client.company_dsn#"
              tablename="CMFAP"
              label="GUID"
              >
              
    <cfif status EQ "1">  
    	<!---generate new GUID--->
        <cfinvoke component="datafetcher"
                  method="generateid"
                  returnvariable="newsvalue"
                  idtochange="#sValue#"
                  >
         <cfset sValue = newsvalue >
   <cfelse>
   		<cfset sValue = sValue >
   </cfif>




<!---End generate GUID--->

<!---Fetch to GMFPEOPLE-------------------------------------------------------------------------------------->

   					<!---This select query executes only once--->
				   <cfquery name="query_from_grgpool" datasource="#client.global_dsn#" maxrows="1">
					  SELECT   *
						FROM GRGPOOL
					   WHERE REFERENCECODE = '#listvaluehere#';
					</cfquery>
                    <!---End   This select query executes only once--->
                   
					<cfloop query="query_from_grgpool">
						<cfset FIRSTNAME         = '#FIRSTNAME#'>
                        <cfset MIDDLENAME        = '#MIDDLENAME#'>  
                        <cfset LASTNAME          = '#LASTNAME#'>                      
                        <cfset PAGIBIGNUMBER     = '#PAGIBIGNUMBER#'>
                        <cfset SSSNUMBER         = '#SSSNUMBER#'>
                        <cfset TINNUMBER         = '#TINNUMBER#'>
                        <cfset LANDLINENUMBER    = '#LANDLINENUMBER#'>  
                        <cfset COMPANYCODE       = '#COMPANYCODE#'>
                        <cfset CELLPHONENUMBER   = '#CELLPHONENUMBER#'>
                        <cfset EMAILADDRESS      = '#EMAILADDRESS#'>
					</cfloop>
                    
                    <cfquery name="getcompany" datasource="#client.global_dsn#" maxrows="1">
                   		SELECT COMPANYCODE 
						  FROM EGRGCOMPANY
                         WHERE COMPANY_DSN = 'FBC_CBOSE';
                    </cfquery>
                    
                    <cfset COMPANYCODE = '#getcompany.COMPANYCODE#'>
                   
					<cfquery name="inserthere" datasource="#client.global_dsn#">      
                                INSERT INTO GMFPEOPLE ( GUID,
														FIRSTNAME, 
                                                        MIDDLENAME, 
                                                        LASTNAME, 
                                                        PAGIBIGNUMBER, 
                                                        SSSNUMBER, 
                                                        TIN, 
                                                        HOTLINEPHONE, 
                                                        COMPANYCODE, 
                                                        HOTLINECELLPHONE,  
                                                        HOTLINEEMAIL)
                                 VALUES (   <cfqueryparam cfsqltype="cf_sql_varchar" value="#sValue#"/>,
								 		    <cfqueryparam cfsqltype="cf_sql_varchar" value="#FIRSTNAME#"/>,
										    <cfqueryparam cfsqltype="cf_sql_varchar" value="#MIDDLENAME#"/>,
										    <cfqueryparam cfsqltype="cf_sql_varchar" value="#LASTNAME#"/>,
										    <cfqueryparam cfsqltype="cf_sql_varchar" value="#PAGIBIGNUMBER#"/>,
										    <cfqueryparam cfsqltype="cf_sql_varchar" value="#SSSNUMBER#"/>,
										    <cfqueryparam cfsqltype="cf_sql_varchar" value="#TINNUMBER#"/>,
										    <cfqueryparam cfsqltype="cf_sql_varchar" value="#LANDLINENUMBER#"/>,
										    <cfqueryparam cfsqltype="cf_sql_varchar" value="#COMPANYCODE#"/>,
										    <cfqueryparam cfsqltype="cf_sql_varchar" value="#CELLPHONENUMBER#"/>,
										    <cfqueryparam cfsqltype="cf_sql_varchar" value="#EMAILADDRESS#"/>
										   );
                    </cfquery>
<!---END Fetch to GMFPEOPLE-------------------------------------------------------------------------------------->
                 
<!---Fetch to CMFAP-------------------------------------------------------------------------------------->

				
					<cfloop query="query_from_grgpool">
						    <cfset REFERENCECODE     = '#REFERENCECODE#'>
						    <cfset SUFFIX            = '#SUFFIX#'>
							<cfset LASTNAME          = '#LASTNAME#'>
							<cfset FIRSTNAME         = '#FIRSTNAME#'>
							<cfset MIDDLENAME        = '#MIDDLENAME#'>
							<cfset DATEOFAPPLICATION = '#DATEOFAPPLICATION#'>
                            <cfset POSITIONFIRSTPRIORITY = '#POSITIONFIRSTPRIORITY#'>
                            <cfset SOURCEEMPLOYMENT  = '#SOURCEEMPLOYMENT#'>
                            <cfset SOURCEOTHERVALUE  = '#SOURCEOTHERVALUE#'>
                            <cfset SOURCEJOBFAIRWHERE= '#SOURCEJOBFAIRWHERE#'>
                            <cfset SOURCEJOBFAIRDATE = '#SOURCEJOBFAIRDATE#'>
                            <cfset SOURCEREFERREDBY  = '#SOURCEREFERREDBY#'>
                            <cfset PAGIBIGNUMBER     = '#PAGIBIGNUMBER#'>
							<cfset SSSNUMBER         = '#SSSNUMBER#'>
							<cfset EXPECTEDSALARY    = '#EXPECTEDSALARY#'>
							<cfset TINNUMBER         = '#TINNUMBER#'>
							<cfset EMAILADDRESS      = '#EMAILADDRESS#'> 
                            <cfset CURRENTSALARY     = '#CURRENTSALARY#'> 
						
					</cfloop>
                    
                    <cfquery name="getpositioncode" datasource="#client.company_dsn#" maxrows="1">
                   		SELECT POSITIONCODE 
                          FROM CLKPOSITION
                         WHERE DESCRIPTION = '#POSITIONFIRSTPRIORITY#';
                    </cfquery>
                            
                    <cfset POSITIONCODE = '#getpositioncode.POSITIONCODE#'>
													
				   
                   
                   <!---<CFMODULE TEMPLATE="../../../common/autogenfield.cfm" ---> 
				   	<CFMODULE TEMPLATE="#autogenpath#"                
                        SEEDKEY="AP"    
                        CODELENGTH="20"
                        COLUMNNAME="APPLICANTNUMBER"    
                        TABLENAME_FK="CMFAP"
                        datasource="#client.company_dsn#"
                        WITHDATE="Y">  
                        <CFSET sApp=AUTOGENVALUE>
                        
                       <cfinvoke component="datafetcher"
                              method="isGuidUsed"
                              returnvariable="status"
                              idtocheck="#sApp#"
                              datasource="#client.company_dsn#"
                              tablename="CMFAP"
                              label="APPLICANTNUMBER">
                       <cfif status EQ "1">
                        //generate new ID APPLICANT NUMBER
                            <cfinvoke component="datafetcher"
                                      method="generateidapp"
                                      returnvariable="newsapp"
                                      idtochange="#sApp#">
                            <cfset sApp = newsapp >
                       <cfelse>
                            <cfset sApp = sApp >
                       </cfif>   
                       
				   <cfset thesource = "#SOURCEEMPLOYMENT# #SOURCEOTHERVALUE# #SOURCEJOBFAIRWHERE# #SOURCEJOBFAIRDATE#" >
                   <cfset thesource = left(thesource, 20) >
                   
				   <cfquery name="insert_to_cmfap" datasource="#client.company_dsn#">  
                                   INSERT INTO CMFAP (  GUID,
                                                        APPLICANTNUMBER,
                                                        SUFFIX,
                                                        LASTNAME,
                                                        FIRSTNAME,
                                                        MIDDLENAME,
                                                        APPLICATIONDATE,
                                                        PAGIBIGNUMBER,
                                                        REFERREDBY,
                                                        SSSNUMBER,
                                                        STARTINGSALARY,
                                                        TIN,
                                                        EMAILADD,
                                                        POSITIONCODE,
                                                        SOURCE,
                                                        RESERVED,
                                                        WORKEXPRATING,
                                                        RECDATECREATED
                                                        )
                                             VALUES ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#sValue#"/>,
                                                      <cfqueryparam cfsqltype="cf_sql_varchar" value="#sApp#"/>,
                                                      <cfqueryparam cfsqltype="cf_sql_varchar" value="#SUFFIX#"/>,
                                                      <cfqueryparam cfsqltype="cf_sql_varchar" value="#LASTNAME#"/>,
                                                      <cfqueryparam cfsqltype="cf_sql_varchar" value="#FIRSTNAME#"/>,
                                                      <cfqueryparam cfsqltype="cf_sql_varchar" value="#MIDDLENAME#"/>,
                                                      <cfqueryparam cfsqltype="cf_sql_date" value="#DATEOFAPPLICATION#"/>,
                                                      <cfqueryparam cfsqltype="cf_sql_varchar" value="#PAGIBIGNUMBER#"/>,
                                                      <cfqueryparam cfsqltype="cf_sql_varchar" value="#SOURCEREFERREDBY#"/>,
                                                      <cfqueryparam cfsqltype="cf_sql_varchar" value="#SSSNUMBER#"/>,
                                                      <cfqueryparam cfsqltype="cf_sql_integer" value="#EXPECTEDSALARY#"/>,
                                                      <cfqueryparam cfsqltype="cf_sql_varchar" value="#TINNUMBER#"/>,
                                                      <cfqueryparam cfsqltype="cf_sql_varchar" value="#EMAILADDRESS#"/>,
                                                      <cfqueryparam cfsqltype="cf_sql_varchar" value="#POSITIONCODE#"/>,
                                                      <cfqueryparam cfsqltype="cf_sql_varchar" value="#thesource#"/>,
                                                      <cfqueryparam cfsqltype="cf_sql_varchar" value="N"/>,
                                                      <cfqueryparam cfsqltype="cf_sql_integer" value="#CURRENTSALARY#"/>,
                                                      <cfqueryparam cfsqltype="cf_sql_date" value="#dateformat(now(), 'YYYY-MM-DD')#"/>
                                                     );                
                    </cfquery>  
<!---END FETCH TO CMFAP-------------------------------------------------------------------------------------->

<!---FETCH TO CIN21PERSONALINFO-------------------------------------------------------------------------------------->
              
                    <cfloop query="query_from_grgpool">
							<cfset PRESENTADDRESSPOSTAL = '#PRESENTADDRESSPOSTAL#'>
                            <cfset PROVINCIALADDRESSPOSTAL = '#PROVINCIALADDRESSPOSTAL#'>
							<cfset DATEOFBIRTH          = '#DATEOFBIRTH#'>
                            <cfset PLACEOFBIRTH     = '#PLACEOFBIRTH#'>
                            <cfset AGE  = '#AGE#'>
                            <cfset GENDER  = '#GENDER#'>
                            <cfset CIVILSTATUS = '#CIVILSTATUS#'>
							<cfset CITIZENSHIP    = '#CITIZENSHIP#'>
							<cfset RELIGION     = '#RELIGION#'>
							<cfset CELLPHONENUMBER = '#CELLPHONENUMBER#'>
							<cfset LANDLINENUMBER = '#LANDLINENUMBER#'>
							<cfset EMAILADDRESS     = '#EMAILADDRESS#'> 
                            <cfset HEIGHT     = '#HEIGHT#'>
                            <cfset WEIGHT     = '#WEIGHT#'>
                            <cfset LANGUAGESPOKEN     = '#LANGUAGESPOKEN#'>
							<cfset INCASEEMERNAME = '#INCASEEMERNAME#'>					
                            <cfset INCASEEMERRELATION = '#INCASEEMERRELATION#'>
                            <cfset INCASEEMERTELNUM = '#INCASEEMERTELNUM#'>
                            <cfset INCASEEMERCELLNUM = '#INCASEEMERCELLNUM#'>  
                            <cfset PRESENTADDRESSOWN = '#PRESENTADDRESSOWN#'>
                            <cfset PROVINCEADDRESSOWN = '#PROVINCEADDRESSOWN#'> 
							<cfset PHOTOIDNAME = '#PHOTOIDNAME#'>
                            
                            <cfset PREVEMPLOYED = '#PREVEMPLOYED# #PREVEMPLOYEDFROM# #PREVEMPLOYEDTO#'>
                            <cfset PREVAPPLIED = '#PREVAPPLIED# #PREVAPPLIEDLAST#'>
                            <cfset DATEAVAILEMP = '#DATEAVAILEMP#'>
                    </cfloop>
													
                    <cfquery name="religiontocode" datasource="#client.global_dsn#" maxrows="1">
                    	SELECT RELIGIONCODE
                          FROM GLKRELIGION
                         WHERE DESCRIPTION = '#RELIGION#';
                    </cfquery>
                    
                    <cfset RELIGION = religiontocode.RELIGIONCODE >
				
                	<cfquery name="insert_to_CIN21PERSONALINFO" datasource="#client.company_dsn#">
                                INSERT INTO CIN21PERSONALINFO ( GUID,
                                								PERSONNELIDNO,
																CONTACTADDRESS,
                                                                PROVINCIALADDRESS,
                                                                BIRTHDAY,
                                                                BIRTHPLACE,
                                                                AGE,
                                                                SEX,
                                                                CIVILSTATUS,
                                                                CITIZENSHIP,
                                                                RELIGIONCODE,
                                                                CONTACTCELLNUMBER,
                                                                CONTACTTELNO,
                                                                EMAILADDRESS,
                                                                HEIGHT,
                                                                WEIGHT,
                                                                LANGUAGESPOKEN,
                                                                PERSONTOCONTACT,
                                                                RELATIONSHIP,
                                                                TELEPHONENUMBER,
																PERCELLNUMBER,
																PREVIOUSADDRESS,
                                                                PROVPERIODOFRES,
                                                                LANGUAGEWRITTEN,
                                                                CONTACTADDRESS2,
                                                                CONTACTADDRESS3,
                                                                ACREXPIRATIONDATE )   
                                 VALUES ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#sValue#"/>,
                                 		  <cfqueryparam cfsqltype="cf_sql_varchar" value="#sApp#"/>,
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#PRESENTADDRESSPOSTAL#"/>,
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#PROVINCIALADDRESSPOSTAL#"/>,
                                          <cfqueryparam cfsqltype="cf_sql_date" value="#DATEOFBIRTH#"/>,
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#PLACEOFBIRTH#"/>,
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#AGE#"/>,
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#GENDER#"/>,
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#CIVILSTATUS#"/>,
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#CITIZENSHIP#"/>,
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#RELIGION#"/>,
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#CELLPHONENUMBER#"/>,
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#LANDLINENUMBER#"/>,
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#EMAILADDRESS#"/>,
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#HEIGHT#"/>,
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#WEIGHT#"/>,
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#LANGUAGESPOKEN#"/>,
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#INCASEEMERNAME#"/>,
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#INCASEEMERRELATION#"/>,
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#INCASEEMERTELNUM#"/>,
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#INCASEEMERCELLNUM#"/>,
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#PRESENTADDRESSOWN#"/>,
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#PROVINCEADDRESSOWN#"/>,
										  <cfqueryparam cfsqltype="cf_sql_varchar" value="#PHOTOIDNAME#"/>,
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#PREVEMPLOYED#"/>,
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#PREVAPPLIED#"/>,
                                          <cfqueryparam cfsqltype="cf_sql_date" value="#DATEAVAILEMP#"/> );                  
                    </cfquery> 
<!---END FETCH TO CIN21PERSONALINFO-------------------------------------------------------------------------------------->

<!---FETCH TO CIN21POSITNAPLD-------------------------------------------------------------------------------------->
                  
                  	<cfloop query="query_from_grgpool">
						<cfset POSITIONFIRSTPRIORITY   = '#POSITIONFIRSTPRIORITY#'>
						<cfset POSITIONSECONDPRIORITY  = '#POSITIONSECONDPRIORITY#'>
                        <cfset POSITIONTHIRDPRIORITY   = '#POSITIONTHIRDPRIORITY#'>
                        <cfset COMPANYFIRSTPRIORITY    = '#COMPANYFIRSTPRIORITY#'>
						<cfset COMPANYSECONDPRIORITY   = '#COMPANYSECONDPRIORITY#'>
                        <cfset COMPANYTHIRDPRIORITY    = '#COMPANYTHIRDPRIORITY#'>
					</cfloop>
							
                            	<cfquery name="getpositioncode1" datasource="#client.company_dsn#" maxrows="1">
                   					SELECT POSITIONCODE 
									  FROM CLKPOSITION
                                     WHERE DESCRIPTION = '#POSITIONFIRSTPRIORITY#' ;
                                </cfquery>
                                <cfquery name="getpositioncode2" datasource="#client.company_dsn#" maxrows="1">
                   					SELECT POSITIONCODE 
									  FROM CLKPOSITION
                                     WHERE DESCRIPTION = '#POSITIONSECONDPRIORITY#' ;
                                </cfquery>
                                <cfquery name="getpositioncode3" datasource="#client.company_dsn#" maxrows="1">
                   					SELECT POSITIONCODE
									  FROM CLKPOSITION
                                     WHERE DESCRIPTION = '#POSITIONTHIRDPRIORITY#' ;
                                </cfquery>
                                        
                                <cfset POSITIONFIRSTPRIORITYC  = '#getpositioncode1.POSITIONCODE#'>
                                <cfset POSITIONSECONDPRIORITYC = '#getpositioncode2.POSITIONCODE#'>
                                <cfset POSITIONTHIRDPRIORITYC  = '#getpositioncode3.POSITIONCODE#'>
                                 
                            	<cfquery name="getcompanycode1" datasource="#client.company_dsn#" maxrows="1">
                   					SELECT COMPANYCODE 
									  FROM CLKCOMPANY
                                     WHERE DESCRIPTION = '#COMPANYFIRSTPRIORITY#';
                                 </cfquery>	
                                 
                                 <cfquery name="getcompanycode2" datasource="#client.company_dsn#" maxrows="1">
                   					SELECT COMPANYCODE 
									  FROM CLKCOMPANY
                                     WHERE DESCRIPTION = '#COMPANYSECONDPRIORITY#';
                                  </cfquery>	
                                  
                                 <cfquery name="getcompanycode3" datasource="#client.company_dsn#" maxrows="1">
                   					SELECT COMPANYCODE 
									  FROM CLKCOMPANY
                                     WHERE DESCRIPTION = '#COMPANYTHIRDPRIORITY#';
                                 </cfquery>	
                                 
                                 <cfset COMPANYFIRSTPRIORITY  = '#getcompanycode1.COMPANYCODE#'>
                                 <cfset COMPANYSECONDPRIORITY = '#getcompanycode2.COMPANYCODE#'>
                                 <cfset COMPANYTHIRDPRIORITY  = '#getcompanycode3.COMPANYCODE#'>		
				   
                  <cfquery name="insert_to_CIN21POSITNAPLD" datasource="#client.company_dsn#">      
                    INSERT INTO CIN21POSITNAPLD (   GUID,
													PERSONNELIDNO,     
                    								POSITIONCODE, 
                                                    POSITIONAPPLIEDFOR,
                                                    DEPARTMENTCODE,
                                                    PRIORITY
                                                )
                                         VALUES (  <cfqueryparam cfsqltype="cf_sql_varchar" value="#sValue#"/>,
                                                   <cfqueryparam cfsqltype="cf_sql_varchar" value="#sApp#"/>,
                                                   <cfqueryparam cfsqltype="cf_sql_varchar" value="#POSITIONFIRSTPRIORITYC#"/>,
                                                   <cfqueryparam cfsqltype="cf_sql_varchar" value="#POSITIONFIRSTPRIORITY#"/>,
                                                   <cfqueryparam cfsqltype="cf_sql_varchar" value="#COMPANYFIRSTPRIORITY#"/>,
                                                   <cfqueryparam cfsqltype="cf_sql_integer" value="1"/>         
                                                ); 
                  </cfquery> 
                  
                  <cfquery name="insert_to_CIN21POSITNAPLD" datasource="#client.company_dsn#">      
                    INSERT INTO CIN21POSITNAPLD (   GUID,
													PERSONNELIDNO,     
                    								POSITIONCODE, 
                                                    POSITIONAPPLIEDFOR,
                                                    DEPARTMENTCODE,
                                                    PRIORITY
                                                )
                                         VALUES (  <cfqueryparam cfsqltype="cf_sql_varchar" value="#sValue#"/>,
                                                   <cfqueryparam cfsqltype="cf_sql_varchar" value="#sApp#"/>,
                                                   <cfqueryparam cfsqltype="cf_sql_varchar" value="#POSITIONSECONDPRIORITYC#"/>,
                                                   <cfqueryparam cfsqltype="cf_sql_varchar" value="#POSITIONSECONDPRIORITY#"/>,
                                                   <cfqueryparam cfsqltype="cf_sql_varchar" value="#COMPANYSECONDPRIORITY#"/>,
                                                   <cfqueryparam cfsqltype="cf_sql_integer" value="2"/>             
                                                ); 
                  </cfquery> 
                  
                  <cfquery name="insert_to_CIN21POSITNAPLD" datasource="#client.company_dsn#">      
                    INSERT INTO CIN21POSITNAPLD (   GUID,
													PERSONNELIDNO,     
                    								POSITIONCODE, 
                                                    POSITIONAPPLIEDFOR,
                                                    DEPARTMENTCODE,
                                                    PRIORITY
                                                )
                                         VALUES (  <cfqueryparam cfsqltype="cf_sql_varchar" value="#sValue#"/>,
                                                   <cfqueryparam cfsqltype="cf_sql_varchar" value="#sApp#"/>,
                                                   <cfqueryparam cfsqltype="cf_sql_varchar" value="#POSITIONTHIRDPRIORITYC#"/>,
                                                   <cfqueryparam cfsqltype="cf_sql_varchar" value="#POSITIONTHIRDPRIORITY#"/>,
                                                   <cfqueryparam cfsqltype="cf_sql_varchar" value="#COMPANYTHIRDPRIORITY#"/>,
                                                   <cfqueryparam cfsqltype="cf_sql_integer" value="3"/>             
                                                ); 
                  </cfquery> 
<!---END FETCH TO CIN21POSITNAPLD-------------------------------------------------------------------------------------->

<!---FETCH TO CIN21FAMILYBKGRND-------------------------------------------------------------------------------------->
                 
                  	<cfloop query="query_from_grgpool">
							<cfset FATHERFULLNAME       = '#FATHERFULLNAME#'>
							<cfset FATHERAGE            = '#FATHERAGE#'>
							<cfset FATHEROCCUPATION     = '#FATHEROCCUPATION#'>
							<cfset FATHERCOMPANY        = '#FATHERCOMPANY#'>
							<cfset FATHERCONTACTNO      = '#FATHERCONTACTNO#'> 
                            
                            <cfset MOTHERFULLNAME       = '#MOTHERFULLNAME#'>
							<cfset MOTHERAGE            = '#MOTHERAGE#'>
							<cfset MOTHEROCCUPATION     = '#MOTHEROCCUPATION#'>
							<cfset MOTHERCOMPANY        = '#MOTHERCOMPANY#'>
							<cfset MOTHERCONTACTNO      = '#MOTHERCONTACTNO#'>    
                            
                            <cfset SPOUSEFULLNAME       = '#SPOUSEFULLNAME#'>
							<cfset SPOUSEAGE            = '#SPOUSEAGE#'>
							<cfset SPOUSEOCCUPATION     = '#SPOUSEOCCUPATION#'>
							<cfset SPOUSECOMPANY        = '#SPOUSECOMPANY#'>
							<cfset SPOUSECONTACTNO      = '#SPOUSECONTACTNO#'> 
                            
                            <cfset FIRSTCHILDFULLNAME   = '#FIRSTCHILDFULLNAME#'>
							<cfset FIRSTCHILDAGE        = '#FIRSTCHILDAGE#'>
							<cfset FIRSTCHILDOCCUPATION = '#FIRSTCHILDOCCUPATION#'>
							<cfset FIRSTCHILDCOMPANY    = '#FIRSTCHILDCOMPANY#'>
							<cfset FIRSTCHILDCONTACTNO  = '#FIRSTCHILDCONTACTNO#'> 
                            
                            <cfset SECONDCHILDFULLNAME  = '#SECONDCHILDFULLNAME#'>
							<cfset SECONDCHILDAGE       = '#SECONDCHILDAGE#'>
							<cfset SECONDCHILDOCCUPATION= '#SECONDCHILDOCCUPATION#'>
							<cfset SECONDCHILDCOMPANY   = '#SECONDCHILDCOMPANY#'>
							<cfset SECONDCHILDCONTACTNO = '#SECONDCHILDCONTACTNO#'> 
                            
                            <cfset THIRDCHILDFULLNAME   = '#THIRDCHILDFULLNAME#'>
							<cfset THIRDCHILDAGE        = '#THIRDCHILDAGE#'>
							<cfset THIRDCHILDOCCUPATION = '#THIRDCHILDOCCUPATION#'>
							<cfset THIRDCHILDCOMPANY    = '#THIRDCHILDCOMPANY#'>
							<cfset THIRDCHILDCONTACTNO  = '#THIRDCHILDCONTACTNO#'> 
                            
                            <cfset FOURTHCHILDFULLNAME  = '#FOURTHCHILDFULLNAME#'>
							<cfset FOURTHCHILDAGE       = '#FOURTHCHILDAGE#'>
							<cfset FOURTHCHILDOCCUPATION= '#FOURTHCHILDOCCUPATION#'>
							<cfset FOURTHCHILDCOMPANY   = '#FOURTHCHILDCOMPANY#'>
							<cfset FOURTHCHILDCONTACTNO = '#FOURTHCHILDCONTACTNO#'> 
                            
                            <cfset FIFTHCHILDFULLNAME   = '#FIFTHCHILDFULLNAME#'>
							<cfset FIFTHCHILDAGE        = '#FIFTHCHILDAGE#'>
							<cfset FIFTHCHILDOCCUPATION = '#FIFTHCHILDOCCUPATION#'>
							<cfset FIFTHCHILDCOMPANY    = '#FIFTHCHILDCOMPANY#'>
							<cfset FIFTHCHILDCONTACTNO  = '#FIFTHCHILDCONTACTNO#'> 
                            
                            <cfset FIRSTBROFULLNAME     = '#FIRSTBROFULLNAME#'>
							<cfset FIRSTBROAGE          = '#FIRSTBROAGE#'>
							<cfset FIRSTBROOCCUPATION   = '#FIRSTBROOCCUPATION#'>
							<cfset FIRSTBROCOMPANY      = '#FIRSTBROCOMPANY#'>
							<cfset FIRSTBROCONTACTNO    = '#FIRSTBROCONTACTNO#'> 
                            
                            <cfset SECONDBROFULLNAME    = '#SECONDBROFULLNAME#'>
							<cfset SECONDBROAGE         = '#SECONDBROAGE#'>
							<cfset SECONDBROOCCUPATION  = '#SECONDBROOCCUPATION#'>
							<cfset SECONDBROCOMPANY     = '#SECONDBROCOMPANY#'>
							<cfset SECONDBROCONTACTNO   = '#SECONDBROCONTACTNO#'>
                            
                            <cfset THIRDBROFULLNAME     = '#THIRDBROFULLNAME#'>
							<cfset THIRDBROAGE          = '#THIRDBROAGE#'>
							<cfset THIRDBROOCCUPATION   = '#THIRDBROOCCUPATION#'>
							<cfset THIRDBROCOMPANY      = '#THIRDBROCOMPANY#'>
							<cfset THIRDBROCONTACTNO    = '#THIRDBROCONTACTNO#'> 
                            
                            <cfset FOURTHBROFULLNAME    = '#FOURTHBROFULLNAME#'>
							<cfset FOURTHBROAGE         = '#FOURTHBROAGE#'>
							<cfset FOURTHBROOCCUPATION  = '#FOURTHBROOCCUPATION#'>
							<cfset FOURTHBROCOMPANY     = '#FOURTHBROCOMPANY#'>
							<cfset FOURTHBROCONTACTNO   = '#FOURTHBROCONTACTNO#'> 
                            
                            <cfset FIFTHBROFULLNAME     = '#FIFTHBROFULLNAME#'> 
							<cfset FIFTHBROAGE          = '#FIFTHBROAGE#'>
							<cfset FIFTHBROOCCUPATION   = '#FIFTHBROOCCUPATION#'>
							<cfset FIFTHBROCOMPANY      = '#FIFTHBROCOMPANY#'>
							<cfset FIFTHBROCONTACTNO    = '#FIFTHBROCONTACTNO#'>  
							
							<cfset SIXTHCHILDFULLNAME    = "#SIXTHCHILDFULLNAME#">
			                <cfset SIXTHCHILDAGE         = "#SIXTHCHILDAGE#">
			                <cfset SIXTHCHILDOCCUPATION  = "#SIXTHCHILDOCCUPATION#">
			                <cfset SIXTHCHILDCOMPANY     = "#SIXTHCHILDCOMPANY#">
			                <cfset SIXTHCHILDCONTACTNO   = "#SIXTHCHILDCONTACTNO#">
			                <cfset SEVENTHCHILDFULLNAME  = "#SEVENTHCHILDFULLNAME#">
			                <cfset SEVENTHCHILDAGE       = "#SEVENTHCHILDAGE#">
			                <cfset SEVENTHCHILDOCCUPATION= "#SEVENTHCHILDOCCUPATION#">
			                <cfset SEVENTHCHILDCOMPANY   = "#SEVENTHCHILDCOMPANY#">
			                <cfset SEVENTHCHILDCONTACTNO = "#SEVENTHCHILDCONTACTNO#">
			                <cfset EIGHTHCHILDFULLNAME   = "#EIGHTHCHILDFULLNAME#">
			                <cfset EIGHTHCHILDAGE    	 = "#EIGHTHCHILDAGE#">
			                <cfset EIGHTHCHILDOCCUPATION = "#EIGHTHCHILDOCCUPATION#">
			                <cfset EIGHTHCHILDCOMPANY    = "#EIGHTHCHILDCOMPANY#">
			                <cfset EIGHTHCHILDCONTACTNO  = "#EIGHTHCHILDCONTACTNO#">
			                <cfset NINTHCHILDFULLNAME    = "#NINTHCHILDFULLNAME#">
			                <cfset NINTHCHILDAGE    	 = "#NINTHCHILDAGE#">
			                <cfset NINTHCHILDOCCUPATION    = "#NINTHCHILDOCCUPATION#">
			                <cfset NINTHCHILDCOMPANY    = "#NINTHCHILDCOMPANY#">
			                <cfset NINTHCHILDCONTACTNO    = "#NINTHCHILDCONTACTNO#">
			                <cfset TENTHCHILDFULLNAME    = "#TENTHCHILDFULLNAME#">
			                <cfset TENTHCHILDAGE    = "#TENTHCHILDAGE#">
			                <cfset TENTHCHILDOCCUPATION    = "#TENTHCHILDOCCUPATION#">
			                <cfset TENTHCHILDCOMPANY    = "#TENTHCHILDCOMPANY#">
			                <cfset TENTHCHILDCONTACTNO    = "#TENTHCHILDCONTACTNO#">
			                <cfset ELEVENTHCHILDFULLNAME    = "#ELEVENTHCHILDFULLNAME#">
			                <cfset ELEVENTHCHILDAGE    = "#ELEVENTHCHILDAGE#">
			                <cfset ELEVENTHCHILDOCCUPATION    = "#ELEVENTHCHILDOCCUPATION#">
			                <cfset ELEVENTHCHILDCOMPANY    = "#ELEVENTHCHILDCOMPANY#">
			                <cfset ELEVENTHCHILDCONTACTNO    = "#ELEVENTHCHILDCONTACTNO#">
			                <cfset TWELVECHILDFULLNAME    = "#TWELVECHILDFULLNAME#">
			                <cfset TWELVECHILDAGE    = "#TWELVECHILDAGE#">
			                <cfset TWELVECHILDOCCUPATION    = "#TWELVECHILDOCCUPATION#">
			                <cfset TWELVECHILDCOMPANY    = "#TWELVECHILDCOMPANY#">
			                <cfset TWELVECHILDCONTACTNO    = "#TWELVECHILDCONTACTNO#">
			                <cfset THIRTEENTHCHILDFULLNAME    = "#THIRTEENTHCHILDFULLNAME#">
			                <cfset THIRTEENTHCHILDAGE    = "#THIRTEENTHCHILDAGE#">
			                <cfset THIRTEENTHCHILDOCCUPATION    = "#THIRTEENTHCHILDOCCUPATION#">
			                <cfset THIRTEENTHCHILDCOMPANY    = "#THIRTEENTHCHILDCOMPANY#">
			                <cfset THIRTEENTHCHILDCONTACTNO    = "#THIRTEENTHCHILDCONTACTNO#">
			                <cfset FOURTEENTHCHILDFULLNAME    = "#FOURTEENTHCHILDFULLNAME#">
			                <cfset FOURTEENTHCHILDAGE    = "#FOURTEENTHCHILDAGE#">
			                <cfset FOURTEENTHCHILDOCCUPATION    = "#FOURTEENTHCHILDOCCUPATION#">
			                <cfset FOURTEENTHCHILDCOMPANY    = "#FOURTEENTHCHILDCOMPANY#">
			                <cfset FOURTEENTHCHILDCONTACTNO    = "#FOURTEENTHCHILDCONTACTNO#">
			                <cfset FIFTEENTHCHILDFULLNAME    = "#FIFTEENTHCHILDFULLNAME#">
			                <cfset FIFTEENTHCHILDAGE    = "#FIFTEENTHCHILDAGE#">
			                <cfset FIFTEENTHCHILDOCCUPATION    = "#FIFTEENTHCHILDOCCUPATION#">
			                <cfset FIFTEENTHCHILDCOMPANY    = "#FIFTEENTHCHILDCOMPANY#">
			                <cfset FIFTEENTHCHILDCONTACTNO    = "#FIFTEENTHCHILDCONTACTNO#">
							
							<cfset SIXTHBROFULLNAME    = "#SIXTHBROFULLNAME#">
			                <cfset SIXTHBROAGE    = "#SIXTHBROAGE#">
			                <cfset SIXTHBROOCCUPATION    = "#SIXTHBROOCCUPATION#">
			                <cfset SIXTHBROCOMPANY    = "#SIXTHBROCOMPANY#">
			                <cfset SIXTHBROCONTACTNO    = "#SIXTHBROCONTACTNO#">
			                <cfset SEVENTHBROFULLNAME    = "#SEVENTHBROFULLNAME#">
			                <cfset SEVENTHBROAGE    = "#SEVENTHBROAGE#">
			                <cfset SEVENTHBROOCCUPATION    = "#SEVENTHBROOCCUPATION#">
			                <cfset SEVENTHBROCOMPANY    = "#SEVENTHBROCOMPANY#">
			                <cfset SEVENTHBROCONTACTNO    = "#SEVENTHBROCONTACTNO#">
			                <cfset EIGHTHBROFULLNAME    = "#EIGHTHBROFULLNAME#">
			                <cfset EIGHTHBROAGE    = "#EIGHTHBROAGE#">
			                <cfset EIGHTHBROOCCUPATION    = "#EIGHTHBROOCCUPATION#">
			                <cfset EIGHTHBROCOMPANY    = "#EIGHTHBROCOMPANY#">
			                <cfset EIGHTHBROCONTACTNO    = "#EIGHTHBROCONTACTNO#">
			                <cfset NINTHBROFULLNAME    = "#NINTHBROFULLNAME#">
			                <cfset NINTHBROAGE    = "#NINTHBROAGE#">
			                <cfset NINTHBROOCCUPATION    = "#NINTHBROOCCUPATION#">
			                <cfset NINTHBROCOMPANY    = "#NINTHBROCOMPANY#">
			                <cfset NINTHBROCONTACTNO    = "#NINTHBROCONTACTNO#">
			                <cfset TENTHBROFULLNAME    = "#TENTHBROFULLNAME#">
			                <cfset TENTHBROAGE    = "#TENTHBROAGE#">
			                <cfset TENTHBROOCCUPATION    = "#TENTHBROOCCUPATION#">
			                <cfset TENTHBROCOMPANY    = "#TENTHBROCOMPANY#">
			                <cfset TENTHBROCONTACTNO    = "#TENTHBROCONTACTNO#">
			                <cfset ELEVENTHBROFULLNAME    = "#ELEVENTHBROFULLNAME#">
			                <cfset ELEVENTHBROAGE    = "#ELEVENTHBROAGE#">
			                <cfset ELEVENTHBROOCCUPATION    = "#ELEVENTHBROOCCUPATION#">
			                <cfset ELEVENTHBROCOMPANY    = "#ELEVENTHBROCOMPANY#">
			                <cfset ELEVENTHBROCONTACTNO    = "#ELEVENTHBROCONTACTNO#">
			                <cfset TWELVEBROFULLNAME    = "#TWELVEBROFULLNAME#">
			                <cfset TWELVEBROAGE    = "#TWELVEBROAGE#">
			                <cfset TWELVEBROOCCUPATION    = "#TWELVEBROOCCUPATION#">
			                <cfset TWELVEBROCOMPANY    = "#TWELVEBROCOMPANY#">
			                <cfset TWELVEBROCONTACTNO    = "#TWELVEBROCONTACTNO#">
			                <cfset THIRTEENTHBROFULLNAME    = "#THIRTEENTHBROFULLNAME#">
			                <cfset THIRTEENTHBROAGE    = "#THIRTEENTHBROAGE#">
			                <cfset THIRTEENTHBROOCCUPATION    = "#THIRTEENTHBROOCCUPATION#">
			                <cfset THIRTEENTHBROCOMPANY    = "#THIRTEENTHBROCOMPANY#">
			                <cfset THIRTEENTHBROCONTACTNO    = "#THIRTEENTHBROCONTACTNO#">
			                <cfset FOURTEENTHBROFULLNAME    = "#FOURTEENTHBROFULLNAME#">
			                <cfset FOURTEENTHBROAGE    = "#FOURTEENTHBROAGE#">
			                <cfset FOURTEENTHBROOCCUPATION    = "#FOURTEENTHBROOCCUPATION#">
			                <cfset FOURTEENTHBROCOMPANY    = "#FOURTEENTHBROCOMPANY#">
			                <cfset FOURTEENTHBROCONTACTNO    = "#FOURTEENTHBROCONTACTNO#">
			                <cfset FIFTEENTHBROFULLNAME    = "#FIFTEENTHBROFULLNAME#">
			                <cfset FIFTEENTHBROAGE    = "#FIFTEENTHBROAGE#">
			                <cfset FIFTEENTHBROOCCUPATION    = "#FIFTEENTHBROOCCUPATION#">
			                <cfset FIFTEENTHBROCOMPANY    = "#FIFTEENTHBROCOMPANY#">
			                <cfset FIFTEENTHBROCONTACTNO    = "#FIFTEENTHBROCONTACTNO#">
					</cfloop>
													
				   <cfif (FATHERFULLNAME NEQ "") AND (FATHERFULLNAME NEQ "NA") AND (FATHERFULLNAME NEQ "N/A")>
                   		<cfquery name="insert_to_CIN21FAMILYBKGROUND" datasource="#client.company_dsn#">
                                INSERT INTO CIN21FAMILYBKGRND (     GUID,
																	PERSONNELIDNO,
																	NAME,
																	AGE,
																	COMPANY,
																	OCCUPATION,
														 			RELATIONSHIP, 
																	TELEPHONENUMBER    
														       )      
                                 VALUES ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#sValue#"/>,
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#sApp#"/>,       
                                 		  <cfqueryparam cfsqltype="cf_sql_varchar" value="#FATHERFULLNAME#"/>,    
                                          <cfqueryparam cfsqltype="cf_sql_integer" value="#FATHERAGE#"/>,
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#FATHERCOMPANY#"/>,
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#FATHEROCCUPATION#"/>,
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="FATHER"/>,
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#FATHERCONTACTNO#"/>
										 );     
                        </cfquery>
                   <cfelse>
                   </cfif>
                   
                   <cfif (MOTHERFULLNAME NEQ "") AND (MOTHERFULLNAME NEQ "NA") AND (MOTHERFULLNAME NEQ "N/A")>
                   		<cfquery name="insert_to_CIN21FAMILYBKGROUND" datasource="#client.company_dsn#">
                               INSERT INTO CIN21FAMILYBKGRND (      GUID,
																	PERSONNELIDNO,
																	NAME,
																	AGE,
																	COMPANY,
																	OCCUPATION,
														 			RELATIONSHIP, 
																	TELEPHONENUMBER 
														     )      
                                 VALUES ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#sValue#"/>,
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#sApp#"/>,       
                                 		  <cfqueryparam cfsqltype="cf_sql_varchar" value="#MOTHERFULLNAME#"/>,   
                                          <cfqueryparam cfsqltype="cf_sql_integer" value="#MOTHERAGE#"/>,  
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#MOTHERCOMPANY#"/>,  
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#MOTHEROCCUPATION#"/>,  
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="MOTHER"/>,  
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#MOTHERCONTACTNO#"/> 
										 );     
                        </cfquery>
                   <cfelse>
                   </cfif>
                   
                   <cfif (SPOUSEFULLNAME NEQ "") AND (SPOUSEFULLNAME NEQ "NA") AND (SPOUSEFULLNAME NEQ "N/A")>
                   		<cfquery name="insert_to_CIN21FAMILYBKGROUND" datasource="#client.company_dsn#">
                               INSERT INTO CIN21FAMILYBKGRND (      GUID,
																	PERSONNELIDNO,
																	NAME,
																	AGE,
																	COMPANY,
																	OCCUPATION,
														 			RELATIONSHIP, 
																	TELEPHONENUMBER 
														     )      
                                 VALUES ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#sValue#"/>,
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#sApp#"/>,       
                                 		  <cfqueryparam cfsqltype="cf_sql_varchar" value="#SPOUSEFULLNAME#"/>,     
                                          <cfqueryparam cfsqltype="cf_sql_integer" value="#SPOUSEAGE#"/>,   
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#SPOUSECOMPANY#"/>,   
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#SPOUSEOCCUPATION#"/>,   
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="SPOUSE"/>,   
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#SPOUSECONTACTNO#"/>  
										 );     
                        </cfquery>
                   <cfelse>
                   </cfif>
                   
                   <cfif (FIRSTBROFULLNAME NEQ "") AND (FIRSTCHILDFULLNAME NEQ "NA") AND (FIRSTCHILDFULLNAME NEQ "N/A")>
                   		<cfquery name="insert_to_CIN21FAMILYBKGROUND" datasource="#client.company_dsn#">
                               INSERT INTO CIN21FAMILYBKGRND (      GUID,
																	PERSONNELIDNO,
																	NAME,
																	AGE,
																	COMPANY,
																	OCCUPATION,
														 			RELATIONSHIP, 
																	TELEPHONENUMBER 
														     )      
                                 VALUES ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#sValue#"/>,
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#sApp#"/>,    
                                 		  <cfqueryparam cfsqltype="cf_sql_varchar" value="#FIRSTCHILDFULLNAME#"/>,      
                                          <cfqueryparam cfsqltype="cf_sql_integer" value="#FIRSTCHILDAGE#"/>,   
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#FIRSTCHILDCOMPANY#"/>,   
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#FIRSTCHILDOCCUPATION#"/>,   
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="SON OR DAUGHTER"/>,   
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#FIRSTCHILDCONTACTNO#"/>
										 );     
                        </cfquery>
                   <cfelse>
                   </cfif>
                   
                   <cfif (SECONDCHILDFULLNAME NEQ "") AND (SECONDCHILDFULLNAME NEQ "NA") AND (SECONDCHILDFULLNAME NEQ "N/A")>
                          <cfquery name="insert_to_CIN21FAMILYBKGROUND" datasource="#client.company_dsn#">
                               INSERT INTO CIN21FAMILYBKGRND (      GUID,
																	PERSONNELIDNO,
																	NAME,
																	AGE,
																	COMPANY,
																	OCCUPATION,
														 			RELATIONSHIP, 
																	TELEPHONENUMBER 
														     )      
                                 VALUES ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#sValue#"/>,
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#sApp#"/>,    
                                 		  <cfqueryparam cfsqltype="cf_sql_varchar" value="#SECONDCHILDFULLNAME#"/>,      
                                          <cfqueryparam cfsqltype="cf_sql_integer" value="#SECONDCHILDAGE#"/>,   
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#SECONDCHILDCOMPANY#"/>,   
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#SECONDCHILDOCCUPATION#"/>,   
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="SON OR DAUGHTER"/>,   
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#SECONDCHILDCONTACTNO#"/>
										 );     
                          </cfquery>
                   <cfelse>
                   </cfif>
                   
                   <cfif (THIRDCHILDFULLNAME NEQ "") AND (THIRDCHILDFULLNAME NEQ "NA") AND (THIRDCHILDFULLNAME NEQ "N/A")>
                   
                   		
                   
                   <cfquery name="insert_to_CIN21FAMILYBKGROUND" datasource="#client.company_dsn#">
                               
                               INSERT INTO CIN21FAMILYBKGRND (      GUID,
																	PERSONNELIDNO,
																	NAME,
																	AGE,
																	COMPANY,
																	OCCUPATION,
														 			RELATIONSHIP, 
																	TELEPHONENUMBER 
														         )      
                                 VALUES ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#sValue#"/>,
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#sApp#"/>,    
                                 		  <cfqueryparam cfsqltype="cf_sql_varchar" value="#THIRDCHILDFULLNAME#"/>,      
                                          <cfqueryparam cfsqltype="cf_sql_integer" value="#THIRDCHILDAGE#"/>,   
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#THIRDCHILDCOMPANY#"/>,   
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#THIRDCHILDOCCUPATION#"/>,   
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="SON OR DAUGHTER"/>,   
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#THIRDCHILDCONTACTNO#"/>
										 );     
                                  
                    	</cfquery>
                   
                   
                   <cfelse>
                   
                   </cfif>
                   
                   
                   <cfif (FOURTHCHILDFULLNAME NEQ "") AND (FOURTHCHILDFULLNAME NEQ "NA") AND (FOURTHCHILDFULLNAME NEQ "N/A")>
                   
                   			
                   
                   <cfquery name="insert_to_CIN21FAMILYBKGROUND" datasource="#client.company_dsn#">
                               
                               INSERT INTO CIN21FAMILYBKGRND (      GUID,
																	PERSONNELIDNO,
																	NAME,
																	AGE,
																	COMPANY,
																	OCCUPATION,
														 			RELATIONSHIP, 
																	TELEPHONENUMBER 
														         )      
                                 VALUES ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#sValue#"/>,
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#sApp#"/>,    
                                 		  <cfqueryparam cfsqltype="cf_sql_varchar" value="#FOURTHCHILDFULLNAME#"/>,      
                                          <cfqueryparam cfsqltype="cf_sql_integer" value="#FOURTHCHILDAGE#"/>,   
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#FOURTHCHILDCOMPANY#"/>,   
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#FOURTHCHILDOCCUPATION#"/>,   
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="SON OR DAUGHTER"/>,   
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#FOURTHCHILDCONTACTNO#"/>
										 );     
                                  
                    	</cfquery>
                   
                   
                   <cfelse>
                   
                   </cfif>
                   
                   
                   <cfif (FIFTHCHILDFULLNAME NEQ "") AND (FIFTHCHILDFULLNAME NEQ "NA") AND (FIFTHCHILDFULLNAME NEQ "N/A")>
                   
                        <cfquery name="insert_to_CIN21FAMILYBKGROUND" datasource="#client.company_dsn#">
                               
                               INSERT INTO CIN21FAMILYBKGRND (      GUID,
																	PERSONNELIDNO,
																	NAME,
																	AGE,
																	COMPANY,
																	OCCUPATION,
														 			RELATIONSHIP, 
																	TELEPHONENUMBER 
														         )      
	                                 VALUES ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#sValue#"/>,
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#sApp#"/>,    
	                                 		  <cfqueryparam cfsqltype="cf_sql_varchar" value="#FIFTHCHILDFULLNAME#"/>,      
	                                          <cfqueryparam cfsqltype="cf_sql_integer" value="#FIFTHCHILDAGE#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#FIFTHCHILDCOMPANY#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#FIFTHCHILDOCCUPATION#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="SON OR DAUGHTER"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#FIFTHCHILDCONTACTNO#"/>
											 );     
                                  
                    	</cfquery>
                   
                   
                   <cfelse>
                   
                   </cfif>
                   
                   
                   <cfif (SIXTHCHILDFULLNAME NEQ "") AND (SIXTHCHILDFULLNAME NEQ "NA") AND (SIXTHCHILDFULLNAME NEQ "N/A")>
                   
                        <cfquery name="insert_to_CIN21FAMILYBKGROUND" datasource="#client.company_dsn#">
                               
                               INSERT INTO CIN21FAMILYBKGRND (      GUID,
																	PERSONNELIDNO,
																	NAME,
																	AGE,
																	COMPANY,
																	OCCUPATION,
														 			RELATIONSHIP,   
																	TELEPHONENUMBER 
														         )      
	                                 VALUES ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#sValue#"/>,
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#sApp#"/>,    
	                                 		  <cfqueryparam cfsqltype="cf_sql_varchar" value="#SIXTHCHILDFULLNAME#"/>,      
	                                          <cfqueryparam cfsqltype="cf_sql_integer" value="#SIXTHCHILDAGE#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#SIXTHCHILDCOMPANY#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#SIXTHCHILDOCCUPATION#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="SON OR DAUGHTER"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#SIXTHCHILDCONTACTNO#"/>
											 );     
                                  
                    	</cfquery>
                   
                   
                   <cfelse>
                   
                   </cfif>
                   
                   
                   <cfif (SEVENTHCHILDFULLNAME NEQ "") AND (SEVENTHCHILDFULLNAME NEQ "NA") AND (SEVENTHCHILDFULLNAME NEQ "N/A")>
                   
                        <cfquery name="insert_to_CIN21FAMILYBKGROUND" datasource="#client.company_dsn#">
                               
                               INSERT INTO CIN21FAMILYBKGRND (      GUID,
																	PERSONNELIDNO,
																	NAME,
																	AGE,
																	COMPANY,
																	OCCUPATION,
														 			RELATIONSHIP, 
																	TELEPHONENUMBER 
														         )      
	                                 VALUES ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#sValue#"/>,
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#sApp#"/>,    
	                                 		  <cfqueryparam cfsqltype="cf_sql_varchar" value="#SEVENTHCHILDFULLNAME#"/>,      
	                                          <cfqueryparam cfsqltype="cf_sql_integer" value="#SEVENTHCHILDAGE#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#SEVENTHCHILDCOMPANY#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#SEVENTHCHILDOCCUPATION#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="SON OR DAUGHTER"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#SEVENTHCHILDCONTACTNO#"/>
											 );     
                                  
                    	</cfquery>
                   
                   
                   <cfelse>
                   
                   </cfif>
                   
                   
                   <cfif (EIGHTHCHILDFULLNAME NEQ "") AND (EIGHTHCHILDFULLNAME NEQ "NA") AND (EIGHTHCHILDFULLNAME NEQ "N/A")>
                   
                        <cfquery name="insert_to_CIN21FAMILYBKGROUND" datasource="#client.company_dsn#">
                               
                               INSERT INTO CIN21FAMILYBKGRND (      GUID,
																	PERSONNELIDNO,
																	NAME,
																	AGE,
																	COMPANY,
																	OCCUPATION,
														 			RELATIONSHIP, 
																	TELEPHONENUMBER 
														         )      
	                                 VALUES ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#sValue#"/>,
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#sApp#"/>,    
	                                 		  <cfqueryparam cfsqltype="cf_sql_varchar" value="#EIGHTHCHILDFULLNAME#"/>,      
	                                          <cfqueryparam cfsqltype="cf_sql_integer" value="#EIGHTHCHILDAGE#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#EIGHTHCHILDCOMPANY#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#EIGHTHCHILDOCCUPATION#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="SON OR DAUGHTER"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#EIGHTHCHILDCONTACTNO#"/>
											 );     
                                  
                    	</cfquery>
                   
                   
                   <cfelse>
                   
                   </cfif>
                   
                   
                   <cfif (NINTHCHILDFULLNAME NEQ "") AND (NINTHCHILDFULLNAME NEQ "NA") AND (NINTHCHILDFULLNAME NEQ "N/A")>
                   
                        <cfquery name="insert_to_CIN21FAMILYBKGROUND" datasource="#client.company_dsn#">
                               
                               INSERT INTO CIN21FAMILYBKGRND (      GUID,
																	PERSONNELIDNO,
																	NAME,
																	AGE,
																	COMPANY,
																	OCCUPATION,
														 			RELATIONSHIP, 
																	TELEPHONENUMBER 
														         )      
	                                 VALUES ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#sValue#"/>,
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#sApp#"/>,    
	                                 		  <cfqueryparam cfsqltype="cf_sql_varchar" value="#NINTHCHILDFULLNAME#"/>,      
	                                          <cfqueryparam cfsqltype="cf_sql_integer" value="#NINTHCHILDAGE#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#NINTHCHILDCOMPANY#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#NINTHCHILDOCCUPATION#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="SON OR DAUGHTER"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#NINTHCHILDCONTACTNO#"/>
											 );     
                                  
                    	</cfquery>
                   
                   
                   <cfelse>
                   
                   </cfif>
                   
                   
                   <cfif (TENTHCHILDFULLNAME NEQ "") AND (TENTHCHILDFULLNAME NEQ "NA") AND (TENTHCHILDFULLNAME NEQ "N/A")>
                   
                        <cfquery name="insert_to_CIN21FAMILYBKGROUND" datasource="#client.company_dsn#">
                               
                               INSERT INTO CIN21FAMILYBKGRND (      GUID,
																	PERSONNELIDNO,
																	NAME,
																	AGE,
																	COMPANY,
																	OCCUPATION,
														 			RELATIONSHIP, 
																	TELEPHONENUMBER 
														         )      
	                                 VALUES ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#sValue#"/>,
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#sApp#"/>,    
	                                 		  <cfqueryparam cfsqltype="cf_sql_varchar" value="#TENTHCHILDFULLNAME#"/>,      
	                                          <cfqueryparam cfsqltype="cf_sql_integer" value="#TENTHCHILDAGE#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#TENTHCHILDCOMPANY#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#TENTHCHILDOCCUPATION#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="SON OR DAUGHTER"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#TENTHCHILDCONTACTNO#"/>
											 );     
                                  
                    	</cfquery>
                   
                   
                   <cfelse>
                   
                   </cfif>
                   
                   
                   <cfif (ELEVENTHCHILDFULLNAME NEQ "") AND (ELEVENTHCHILDFULLNAME NEQ "NA") AND (ELEVENTHCHILDFULLNAME NEQ "N/A")>
                   
                        <cfquery name="insert_to_CIN21FAMILYBKGROUND" datasource="#client.company_dsn#">
                               
                               INSERT INTO CIN21FAMILYBKGRND (      GUID,
																	PERSONNELIDNO,
																	NAME,
																	AGE,
																	COMPANY,
																	OCCUPATION,
														 			RELATIONSHIP, 
																	TELEPHONENUMBER 
														         )      
	                                 VALUES ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#sValue#"/>,
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#sApp#"/>,    
	                                 		  <cfqueryparam cfsqltype="cf_sql_varchar" value="#ELEVENTHCHILDFULLNAME#"/>,      
	                                          <cfqueryparam cfsqltype="cf_sql_integer" value="#ELEVENTHCHILDAGE#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#ELEVENTHCHILDCOMPANY#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#ELEVENTHCHILDOCCUPATION#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="SON OR DAUGHTER"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#ELEVENTHCHILDCONTACTNO#"/>
											 );     
                                  
                    	</cfquery>
                   
                   
                   <cfelse>
                   
                   </cfif>
                   
                   
                   <cfif (TWELVECHILDFULLNAME NEQ "") AND (TWELVECHILDFULLNAME NEQ "NA") AND (TWELVECHILDFULLNAME NEQ "N/A")>
                   
                        <cfquery name="insert_to_CIN21FAMILYBKGROUND" datasource="#client.company_dsn#">
                               
                               INSERT INTO CIN21FAMILYBKGRND (      GUID,
																	PERSONNELIDNO,
																	NAME,
																	AGE,
																	COMPANY,
																	OCCUPATION,
														 			RELATIONSHIP, 
																	TELEPHONENUMBER 
														         )      
	                                 VALUES ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#sValue#"/>,
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#sApp#"/>,    
	                                 		  <cfqueryparam cfsqltype="cf_sql_varchar" value="#TWELVECHILDFULLNAME#"/>,      
	                                          <cfqueryparam cfsqltype="cf_sql_integer" value="#TWELVECHILDAGE#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#TWELVECHILDCOMPANY#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#TWELVECHILDOCCUPATION#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="SON OR DAUGHTER"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#TWELVECHILDCONTACTNO#"/>
											 );     
                                  
                    	</cfquery>
                   
                   
                   <cfelse>
                   
                   </cfif>
                   
                   
                   <cfif (THIRTEENTHCHILDFULLNAME NEQ "") AND (THIRTEENTHCHILDFULLNAME NEQ "NA") AND (THIRTEENTHCHILDFULLNAME NEQ "N/A")>
                   
                        <cfquery name="insert_to_CIN21FAMILYBKGROUND" datasource="#client.company_dsn#">
                               
                               INSERT INTO CIN21FAMILYBKGRND (      GUID,
																	PERSONNELIDNO,
																	NAME,
																	AGE,
																	COMPANY,
																	OCCUPATION,
														 			RELATIONSHIP, 
																	TELEPHONENUMBER 
														         )      
	                                 VALUES ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#sValue#"/>,
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#sApp#"/>,    
	                                 		  <cfqueryparam cfsqltype="cf_sql_varchar" value="#THIRTEENTHCHILDFULLNAME#"/>,      
	                                          <cfqueryparam cfsqltype="cf_sql_integer" value="#THIRTEENTHCHILDAGE#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#THIRTEENTHCHILDCOMPANY#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#THIRTEENTHCHILDOCCUPATION#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="SON OR DAUGHTER"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#THIRTEENTHCHILDCONTACTNO#"/>
											 );     
                                  
                    	</cfquery>
                   
                   
                   <cfelse>
                   
                   </cfif>
                   
                   
                   <cfif (FOURTEENTHCHILDFULLNAME NEQ "") AND (FOURTEENTHCHILDFULLNAME NEQ "NA") AND (FOURTEENTHCHILDFULLNAME NEQ "N/A")>
                   
                        <cfquery name="insert_to_CIN21FAMILYBKGROUND" datasource="#client.company_dsn#">
                               
                               INSERT INTO CIN21FAMILYBKGRND (      GUID,
																	PERSONNELIDNO,
																	NAME,
																	AGE,
																	COMPANY,
																	OCCUPATION,
														 			RELATIONSHIP, 
																	TELEPHONENUMBER 
														         )      
	                                 VALUES ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#sValue#"/>,
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#sApp#"/>,    
	                                 		  <cfqueryparam cfsqltype="cf_sql_varchar" value="#FOURTEENTHCHILDFULLNAME#"/>,      
	                                          <cfqueryparam cfsqltype="cf_sql_integer" value="#FOURTEENTHCHILDAGE#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#FOURTEENTHCHILDCOMPANY#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#FOURTEENTHCHILDOCCUPATION#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="SON OR DAUGHTER"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#FOURTEENTHCHILDCONTACTNO#"/>
											 );     
                                  
                    	</cfquery>
                   
                   
                   <cfelse>
                   
                   </cfif>
                   
                   
                   <cfif (FIFTEENTHCHILDFULLNAME NEQ "") AND (FIFTEENTHCHILDFULLNAME NEQ "NA") AND (FIFTEENTHCHILDFULLNAME NEQ "N/A")>
                   
                        <cfquery name="insert_to_CIN21FAMILYBKGROUND" datasource="#client.company_dsn#">
                               
                               INSERT INTO CIN21FAMILYBKGRND (      GUID,
																	PERSONNELIDNO,
																	NAME,
																	AGE,
																	COMPANY,
																	OCCUPATION,
														 			RELATIONSHIP, 
																	TELEPHONENUMBER 
														         )      
	                                 VALUES ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#sValue#"/>,
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#sApp#"/>,    
	                                 		  <cfqueryparam cfsqltype="cf_sql_varchar" value="#FIFTEENTHCHILDFULLNAME#"/>,      
	                                          <cfqueryparam cfsqltype="cf_sql_integer" value="#FIFTEENTHCHILDAGE#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#FIFTEENTHCHILDCOMPANY#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#FIFTEENTHCHILDOCCUPATION#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="SON OR DAUGHTER"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#FIFTEENTHCHILDCONTACTNO#"/>
											 );     
                                  
                    	</cfquery>
                   
                   
                   <cfelse>
                   
                   </cfif>
                   
                   
                   
                   
                   
                   
                   
                   
                   <cfif (FIRSTBROFULLNAME NEQ "") AND (FIRSTBROFULLNAME NEQ "NA") AND (FIRSTBROFULLNAME NEQ "N/A")>
                   
                   		
                   
                   		<cfquery name="insert_to_CIN21FAMILYBKGROUND" datasource="#client.company_dsn#">
                               
                               INSERT INTO CIN21FAMILYBKGRND (      GUID,
																	PERSONNELIDNO,
																	NAME,
																	AGE,
																	COMPANY,
																	OCCUPATION,
														 			RELATIONSHIP, 
																	TELEPHONENUMBER 
														         )      
                                 VALUES ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#sValue#"/>,
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#sApp#"/>,    
                                 		  <cfqueryparam cfsqltype="cf_sql_varchar" value="#FIRSTBROFULLNAME#"/>, 
                                          <cfqueryparam cfsqltype="cf_sql_integer" value="#FIRSTBROAGE#"/>, 
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#FIRSTBROCOMPANY#"/>, 
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#FIRSTBROOCCUPATION#"/>, 
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="BRO OR SIS"/>, 
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#FIRSTBROCONTACTNO#"/>
										 );     
                                  
                    	</cfquery>
                   
                   
                   <cfelse>
                   
                   </cfif>
                   
                   
                   <cfif (SECONDBROFULLNAME NEQ "") AND (SECONDBROFULLNAME NEQ "NA") AND (SECONDBROFULLNAME NEQ "N/A")>
                   
                   		
                   
                   <cfquery name="insert_to_CIN21FAMILYBKGROUND" datasource="#client.company_dsn#">
                               
                               INSERT INTO CIN21FAMILYBKGRND (      GUID,
																	PERSONNELIDNO,
																	NAME,
																	AGE,
																	COMPANY,
																	OCCUPATION,
														 			RELATIONSHIP, 
																	TELEPHONENUMBER 
														         )      
                                 VALUES ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#sValue#"/>,
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#sApp#"/>,    
                                 		  <cfqueryparam cfsqltype="cf_sql_varchar" value="#SECONDBROFULLNAME#"/>, 
                                          <cfqueryparam cfsqltype="cf_sql_integer" value="#SECONDBROAGE#"/>, 
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#SECONDBROCOMPANY#"/>, 
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#SECONDBROOCCUPATION#"/>, 
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="BRO OR SIS"/>, 
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#SECONDBROCONTACTNO#"/>
										 );     
                                  
                    	</cfquery>
                   
                   
                   <cfelse>
                   
                   </cfif>
                   
                   
                   <cfif (THIRDBROFULLNAME NEQ "") AND (THIRDBROFULLNAME NEQ "NA") AND (THIRDBROFULLNAME NEQ "N/A")>
                   
                   			
                   
                   <cfquery name="insert_to_CIN21FAMILYBKGROUND" datasource="#client.company_dsn#">
                               
                               INSERT INTO CIN21FAMILYBKGRND (      GUID,
																	PERSONNELIDNO,
																	NAME,
																	AGE,
																	COMPANY,
																	OCCUPATION,
														 			RELATIONSHIP, 
																	TELEPHONENUMBER 
														         )      
                                 VALUES ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#sValue#"/>,
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#sApp#"/>,    
                                 		  <cfqueryparam cfsqltype="cf_sql_varchar" value="#THIRDBROFULLNAME#"/>, 
                                          <cfqueryparam cfsqltype="cf_sql_integer" value="#THIRDBROAGE#"/>, 
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#THIRDBROCOMPANY#"/>, 
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#THIRDBROOCCUPATION#"/>, 
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="BRO OR SIS"/>, 
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#THIRDBROCONTACTNO#"/>
										 );     
                                  
                    	</cfquery>
                   
                   
                   <cfelse>
                   
                   </cfif>
                   
                   
                   <cfif (FOURTHBROFULLNAME NEQ "") AND (FOURTHBROFULLNAME NEQ "NA") AND (FOURTHBROFULLNAME NEQ "N/A")>
                   
                   		
                   
                   <cfquery name="insert_to_CIN21FAMILYBKGROUND" datasource="#client.company_dsn#">
                               
                               INSERT INTO CIN21FAMILYBKGRND (      GUID,
																	PERSONNELIDNO,
																	NAME,
																	AGE,
																	COMPANY,
																	OCCUPATION,
														 			RELATIONSHIP, 
																	TELEPHONENUMBER 
														         )      
                                 VALUES ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#sValue#"/>,
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#sApp#"/>,    
                                 		  <cfqueryparam cfsqltype="cf_sql_varchar" value="#FOURTHBROFULLNAME#"/>, 
                                          <cfqueryparam cfsqltype="cf_sql_integer" value="#FOURTHBROAGE#"/>, 
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#FOURTHBROCOMPANY#"/>, 
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#FOURTHBROOCCUPATION#"/>, 
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="BRO OR SIS"/>, 
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#FOURTHBROCONTACTNO#"/>
										 );     
                                  
                    	</cfquery>
                   
                   
                   <cfelse>
                   
                   </cfif>
                   
                   
                   <cfif (FIFTHBROFULLNAME NEQ "") AND (FIFTHBROFULLNAME NEQ "NA") AND (FIFTHBROFULLNAME NEQ "N/A")>
                   
                   		
                   
                   <cfquery name="insert_to_CIN21FAMILYBKGROUND" datasource="#client.company_dsn#">
                               
                               INSERT INTO CIN21FAMILYBKGRND (      GUID,
																	PERSONNELIDNO,
																	NAME,
																	AGE,
																	COMPANY,
																	OCCUPATION,
														 			RELATIONSHIP, 
																	TELEPHONENUMBER 
														         )      
                                 VALUES ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#sValue#"/>,
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#sApp#"/>,    
                                 		  <cfqueryparam cfsqltype="cf_sql_varchar" value="#FIFTHBROFULLNAME#"/>, 
                                          <cfqueryparam cfsqltype="cf_sql_integer" value="#FIFTHBROAGE#"/>, 
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#FIFTHBROCOMPANY#"/>, 
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#FIFTHBROOCCUPATION#"/>, 
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="BRO OR SIS"/>, 
                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#FIFTHBROCONTACTNO#"/>
										 );     
                                  
                    	</cfquery>
                   
                   
                   <cfelse>
                   
                   </cfif>
                   
                   
                   
                   
                   <cfif (SIXTHBROFULLNAME NEQ "") AND (SIXTHBROFULLNAME NEQ "NA") AND (SIXTHBROFULLNAME NEQ "N/A")>
                   
                        <cfquery name="insert_to_CIN21FAMILYBKGROUND" datasource="#client.company_dsn#">
                               
                               INSERT INTO CIN21FAMILYBKGRND (      GUID,
																	PERSONNELIDNO,
																	NAME,
																	AGE,
																	COMPANY,
																	OCCUPATION,
														 			RELATIONSHIP, 
																	TELEPHONENUMBER 
														         )      
	                                 VALUES ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#sValue#"/>,
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#sApp#"/>,    
	                                 		  <cfqueryparam cfsqltype="cf_sql_varchar" value="#SIXTHBROFULLNAME#"/>,      
	                                          <cfqueryparam cfsqltype="cf_sql_integer" value="#SIXTHBROAGE#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#SIXTHBROCOMPANY#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#SIXTHBROOCCUPATION#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="BRO OR SIS"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#SIXTHBROCONTACTNO#"/>
											 );     
                                  
                    	</cfquery>
                   
                   
                   <cfelse>
                   
                   </cfif>
                   
                   
                   <cfif (SEVENTHBROFULLNAME NEQ "") AND (SEVENTHBROFULLNAME NEQ "NA") AND (SEVENTHBROFULLNAME NEQ "N/A")>
                   
                        <cfquery name="insert_to_CIN21FAMILYBKGROUND" datasource="#client.company_dsn#">
                               
                               INSERT INTO CIN21FAMILYBKGRND (      GUID,
																	PERSONNELIDNO,
																	NAME,
																	AGE,
																	COMPANY,
																	OCCUPATION,
														 			RELATIONSHIP, 
																	TELEPHONENUMBER 
														         )      
	                                 VALUES ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#sValue#"/>,
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#sApp#"/>,    
	                                 		  <cfqueryparam cfsqltype="cf_sql_varchar" value="#SEVENTHBROFULLNAME#"/>,      
	                                          <cfqueryparam cfsqltype="cf_sql_integer" value="#SEVENTHBROAGE#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#SEVENTHBROCOMPANY#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#SEVENTHBROOCCUPATION#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="BRO OR SIS"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#SEVENTHBROCONTACTNO#"/>
											 );     
                                  
                    	</cfquery>
                   
                   
                   <cfelse>
                   
                   </cfif>
                   
                   
                   <cfif (EIGHTHBROFULLNAME NEQ "") AND (EIGHTHBROFULLNAME NEQ "NA") AND (EIGHTHBROFULLNAME NEQ "N/A")>
                   
                        <cfquery name="insert_to_CIN21FAMILYBKGROUND" datasource="#client.company_dsn#">
                               
                               INSERT INTO CIN21FAMILYBKGRND (      GUID,
																	PERSONNELIDNO,
																	NAME,
																	AGE,
																	COMPANY,
																	OCCUPATION,
														 			RELATIONSHIP, 
																	TELEPHONENUMBER 
														         )      
	                                 VALUES ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#sValue#"/>,
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#sApp#"/>,    
	                                 		  <cfqueryparam cfsqltype="cf_sql_varchar" value="#EIGHTHBROFULLNAME#"/>,      
	                                          <cfqueryparam cfsqltype="cf_sql_integer" value="#EIGHTHBROAGE#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#EIGHTHBROCOMPANY#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#EIGHTHBROOCCUPATION#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="BRO OR SIS"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#EIGHTHBROCONTACTNO#"/>
											 );     
                                  
                    	</cfquery>
                   
                   
                   <cfelse>
                   
                   </cfif>
                   
                   
                   <cfif (NINTHBROFULLNAME NEQ "") AND (NINTHBROFULLNAME NEQ "NA") AND (NINTHBROFULLNAME NEQ "N/A")>
                   
                        <cfquery name="insert_to_CIN21FAMILYBKGROUND" datasource="#client.company_dsn#">
                               
                               INSERT INTO CIN21FAMILYBKGRND (      GUID,
																	PERSONNELIDNO,
																	NAME,
																	AGE,
																	COMPANY,
																	OCCUPATION,
														 			RELATIONSHIP, 
																	TELEPHONENUMBER 
														         )      
	                                 VALUES ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#sValue#"/>,
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#sApp#"/>,    
	                                 		  <cfqueryparam cfsqltype="cf_sql_varchar" value="#NINTHBROFULLNAME#"/>,      
	                                          <cfqueryparam cfsqltype="cf_sql_integer" value="#NINTHBROAGE#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#NINTHBROCOMPANY#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#NINTHBROOCCUPATION#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="BRO OR SIS"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#NINTHBROCONTACTNO#"/>
											 );     
                                  
                    	</cfquery>
                   
                   
                   <cfelse>
                   
                   </cfif>
                   
                   
                   <cfif (TENTHBROFULLNAME NEQ "") AND (TENTHBROFULLNAME NEQ "NA") AND (TENTHBROFULLNAME NEQ "N/A")>
                   
                        <cfquery name="insert_to_CIN21FAMILYBKGROUND" datasource="#client.company_dsn#">
                               
                               INSERT INTO CIN21FAMILYBKGRND (      GUID,
																	PERSONNELIDNO,
																	NAME,
																	AGE,
																	COMPANY,
																	OCCUPATION,
														 			RELATIONSHIP, 
																	TELEPHONENUMBER 
														         )      
	                                 VALUES ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#sValue#"/>,
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#sApp#"/>,    
	                                 		  <cfqueryparam cfsqltype="cf_sql_varchar" value="#TENTHBROFULLNAME#"/>,      
	                                          <cfqueryparam cfsqltype="cf_sql_integer" value="#TENTHBROAGE#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#TENTHBROCOMPANY#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#TENTHBROOCCUPATION#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="BRO OR SIS"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#TENTHBROCONTACTNO#"/>
											 );     
                                  
                    	</cfquery>
                   
                   
                   <cfelse>
                   
                   </cfif>
                   
                   
                   <cfif (ELEVENTHBROFULLNAME NEQ "") AND (ELEVENTHBROFULLNAME NEQ "NA") AND (ELEVENTHBROFULLNAME NEQ "N/A")>
                   
                        <cfquery name="insert_to_CIN21FAMILYBKGROUND" datasource="#client.company_dsn#">
                               
                               INSERT INTO CIN21FAMILYBKGRND (      GUID,
																	PERSONNELIDNO,
																	NAME,
																	AGE,
																	COMPANY,
																	OCCUPATION,
														 			RELATIONSHIP, 
																	TELEPHONENUMBER 
														         )      
	                                 VALUES ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#sValue#"/>,
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#sApp#"/>,    
	                                 		  <cfqueryparam cfsqltype="cf_sql_varchar" value="#ELEVENTHBROFULLNAME#"/>,      
	                                          <cfqueryparam cfsqltype="cf_sql_integer" value="#ELEVENTHBROAGE#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#ELEVENTHBROCOMPANY#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#ELEVENTHBROOCCUPATION#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="BRO OR SIS"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#ELEVENTHBROCONTACTNO#"/>
											 );     
                                  
                    	</cfquery>
                   
                   
                   <cfelse>
                   
                   </cfif>
                   
                   
                   <cfif (TWELVEBROFULLNAME NEQ "") AND (TWELVEBROFULLNAME NEQ "NA") AND (TWELVEBROFULLNAME NEQ "N/A")>
                   
                        <cfquery name="insert_to_CIN21FAMILYBKGROUND" datasource="#client.company_dsn#">
                               
                               INSERT INTO CIN21FAMILYBKGRND (      GUID,
																	PERSONNELIDNO,
																	NAME,
																	AGE,
																	COMPANY,
																	OCCUPATION,
														 			RELATIONSHIP, 
																	TELEPHONENUMBER 
														         )      
	                                 VALUES ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#sValue#"/>,
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#sApp#"/>,    
	                                 		  <cfqueryparam cfsqltype="cf_sql_varchar" value="#TWELVEBROFULLNAME#"/>,      
	                                          <cfqueryparam cfsqltype="cf_sql_integer" value="#TWELVEBROAGE#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#TWELVEBROCOMPANY#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#TWELVEBROOCCUPATION#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="BRO OR SIS"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#TWELVEBROCONTACTNO#"/>
											 );     
                                  
                    	</cfquery>
                   
                   
                   <cfelse>
                   
                   </cfif>
                   
                   
                   <cfif (THIRTEENTHBROFULLNAME NEQ "") AND (THIRTEENTHBROFULLNAME NEQ "NA") AND (THIRTEENTHBROFULLNAME NEQ "N/A")>
                   
                        <cfquery name="insert_to_CIN21FAMILYBKGROUND" datasource="#client.company_dsn#">
                               
                               INSERT INTO CIN21FAMILYBKGRND (      GUID,
																	PERSONNELIDNO,
																	NAME,
																	AGE,
																	COMPANY,
																	OCCUPATION,
														 			RELATIONSHIP, 
																	TELEPHONENUMBER 
														         )      
	                                 VALUES ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#sValue#"/>,
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#sApp#"/>,    
	                                 		  <cfqueryparam cfsqltype="cf_sql_varchar" value="#THIRTEENTHBROFULLNAME#"/>,      
	                                          <cfqueryparam cfsqltype="cf_sql_integer" value="#THIRTEENTHBROAGE#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#THIRTEENTHBROCOMPANY#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#THIRTEENTHBROOCCUPATION#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="BRO OR SIS"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#THIRTEENTHBROCONTACTNO#"/>
											 );     
                                  
                    	</cfquery>
                   
                   
                   <cfelse>
                   
                   </cfif>
                   
                   
                   <cfif (FOURTEENTHBROFULLNAME NEQ "") AND (FOURTEENTHBROFULLNAME NEQ "NA") AND (FOURTEENTHBROFULLNAME NEQ "N/A")>
                   
                        <cfquery name="insert_to_CIN21FAMILYBKGROUND" datasource="#client.company_dsn#">
                               
                               INSERT INTO CIN21FAMILYBKGRND (      GUID,
																	PERSONNELIDNO,
																	NAME,
																	AGE,
																	COMPANY,
																	OCCUPATION,
														 			RELATIONSHIP, 
																	TELEPHONENUMBER 
														         )      
	                                 VALUES ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#sValue#"/>,
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#sApp#"/>,    
	                                 		  <cfqueryparam cfsqltype="cf_sql_varchar" value="#FOURTEENTHBROFULLNAME#"/>,      
	                                          <cfqueryparam cfsqltype="cf_sql_integer" value="#FOURTEENTHBROAGE#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#FOURTEENTHBROCOMPANY#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#FOURTEENTHBROOCCUPATION#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="BRO OR SIS"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#FOURTEENTHBROCONTACTNO#"/>
											 );     
                                  
                    	</cfquery>
                   
                   
                   <cfelse>
                   
                   </cfif>
                   
                   
                   <cfif (FIFTEENTHBROFULLNAME NEQ "") AND (FIFTEENTHBROFULLNAME NEQ "NA") AND (FIFTEENTHBROFULLNAME NEQ "N/A")>
                   
                        <cfquery name="insert_to_CIN21FAMILYBKGROUND" datasource="#client.company_dsn#">
                               
                               INSERT INTO CIN21FAMILYBKGRND (      GUID,
																	PERSONNELIDNO,
																	NAME,
																	AGE,
																	COMPANY,
																	OCCUPATION,
														 			RELATIONSHIP, 
																	TELEPHONENUMBER 
														         )      
	                                 VALUES ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#sValue#"/>,
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#sApp#"/>,    
	                                 		  <cfqueryparam cfsqltype="cf_sql_varchar" value="#FIFTEENTHBROFULLNAME#"/>,      
	                                          <cfqueryparam cfsqltype="cf_sql_integer" value="#FIFTEENTHBROAGE#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#FIFTEENTHBROCOMPANY#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#FIFTEENTHBROOCCUPATION#"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="BRO OR SIS"/>,   
	                                          <cfqueryparam cfsqltype="cf_sql_varchar" value="#FIFTEENTHBROCONTACTNO#"/>
											 );     
                                  
                    	</cfquery>
                   
                   
                   <cfelse>
                   
                   </cfif>
				   
				   
   <!---END FETCH TO CIN21FAMILYBKGRND-------------------------------------------------------------------------------------->

                             
<!---Fetch to CIN21EDUCATION-------------------------------------------------------------------------------------->

				
					<cfloop query="query_from_grgpool">
					
							<cfset POSTGRADSCHOOL     = '#POSTGRADSCHOOL#'>
							<cfset COLLEGESCHOOL      = '#COLLEGESCHOOL#'>
							<cfset VOCATIONALSCHOOL   = '#VOCATIONALSCHOOL#'>
							<cfset SECONDARYSCHOOL    = '#SECONDARYSCHOOL#'>
							
                            <cfset POSTGRADCOURSE     = '#POSTGRADCOURSE#'>
							<cfset COLLEGECOURSE      = '#COLLEGECOURSE#'>
							<cfset VOCATIONALCOURSE   = '#VOCATIONALCOURSE#'>
							<cfset SECONDARYCOURSE    = '#SECONDARYCOURSE#'>
                            
							<cfset POSTGRADFIELD      = '#POSTGRADFIELD#'>
							<cfset COLLEGEFIELD       = '#COLLEGEFIELD#'>
							<cfset VOCATIONALFIELD    = '#VOCATIONALFIELD#'>
							<cfset SECONDARYFIELD     = '#SECONDARYFIELD#'>
							
							<cfset POSTGRADFROM       = '#POSTGRADFROM#'>
                            <cfif POSTGRADFROM EQ ''>
                            	<cfset POSTGRADFROM   = "#dateformat(now(), 'YYYY-MM-DD')#">
                            </cfif>
							<cfset COLLEGEFROM        = '#COLLEGEFROM#'>
                            <cfif COLLEGEFROM EQ ''>
                            	<cfset COLLEGEFROM   = "#dateformat(now(), 'YYYY-MM-DD')#">
                            </cfif>
							<cfset VOCATIONALFROM     = '#VOCATIONALFROM#'>
                            <cfif VOCATIONALFROM EQ ''>
                            	<cfset VOCATIONALFROM   = "#dateformat(now(), 'YYYY-MM-DD')#">
                            </cfif>
							<cfset SECONDARYFROM      = '#SECONDARYFROM#'>
                            <cfif SECONDARYFROM EQ ''>
                            	<cfset SECONDARYFROM   = "#dateformat(now(), 'YYYY-MM-DD')#">
                            </cfif>
							
							<cfset POSTGRADTO         = '#POSTGRADTO#'>
                            <cfif POSTGRADTO EQ ''>
                            	<cfset POSTGRADTO   = "#dateformat(now(), 'YYYY-MM-DD')#">
                            </cfif>
							<cfset COLLEGETO          = '#COLLEGETO#'>
                            <cfif COLLEGETO EQ ''>
                            	<cfset COLLEGETO   = "#dateformat(now(), 'YYYY-MM-DD')#">
                            </cfif>
							<cfset VOCATIONALTO       = '#VOCATIONALTO#'>  
                            <cfif VOCATIONALTO EQ ''>
                            	<cfset VOCATIONALTO   = "#dateformat(now(), 'YYYY-MM-DD')#">
                            </cfif>   
                            <cfset SECONDARYTO        = '#SECONDARYTO#'>
                            <cfif SECONDARYTO EQ ''>
                            	<cfset SECONDARYTO   = "#dateformat(now(), 'YYYY-MM-DD')#">
                            </cfif>
							
							<cfset POSTGRADISGRAD     = '#POSTGRADISGRAD#'>
							<cfset COLLEGEISGRAD      = '#COLLEGEISGRAD#'>
							<cfset VOCATIONALISGRAD   = '#VOCATIONALISGRAD#'>
							<cfset SECONDARYISGRAD    = '#SECONDARYISGRAD#'>
							
							<cfset POSTGRADHONORS     = '#POSTGRADHONORS#'>
							<cfset COLLEGEHONORS      = '#COLLEGEHONORS#'>
							<cfset VOCATIONALHONORS   = '#VOCATIONALHONORS#'>
							<cfset SECONDARYHONORS    = '#SECONDARYHONORS#'>
					
					</cfloop>
                    
       
												
				   <cfif (POSTGRADSCHOOL NEQ "") AND (POSTGRADSCHOOL NEQ "NULL") AND (POSTGRADSCHOOL NEQ "NA") AND (POSTGRADSCHOOL NEQ "N/A")>
                   
                        <cfquery name="getschoolcode" datasource="#client.global_dsn#" maxrows="1">
							SELECT SCHOOLCODE FROM GLKSCHOOL
                             WHERE SCHOOLNAME = '#POSTGRADSCHOOL#'
                             ;
                        </cfquery>
                        <cfset POSTGRADSCHOOLC = '#getschoolcode.SCHOOLCODE#'>
                                    
						<cfquery name="geteduclevel" datasource="#client.global_dsn#" maxrows="1">
							SELECT DEGREECODE FROM GLKDEGREE
							WHERE DESCRIPTION = '#POSTGRADFIELD#'
							;
						</cfquery>
                        <cfset POSTGRADFIELD = '#geteduclevel.DEGREECODE#'>
                                    
						<cfquery name="getcoursecode" datasource="#client.global_dsn#" maxrows="1">
							SELECT COURSECODE FROM GLKCOURSE
							WHERE DESCRIPTION = '#POSTGRADCOURSE#'
							;
						</cfquery>
                        <cfset POSTGRADCOURSE = '#getcoursecode.COURSECODE#'>
                                   
                                   
                        <cfquery name="insert_to_CIN21EDUCATION" datasource="#client.company_dsn#">
                                        
                            INSERT INTO CIN21EDUCATION (    GUID,
															PERSONNELIDNO,
															SCHOOLNAME,    
															EDUCLEVEL,
															MAJORDEGREE,
															COURSECODE,
															SCHOOLCODE,
															DATEBEGIN,
															DATEFINISHED,
															GRADUATE,
															HONORSRECEIVED        
                                                                    )
                                                                
												 VALUES (   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
														    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
														    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#POSTGRADSCHOOL#" >,
														    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "POSTGRAD" >,
														    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#POSTGRADFIELD#" >,
														    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#POSTGRADCOURSE#" >,
														    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#POSTGRADSCHOOLC#" >,
														    <cfqueryparam cfsqltype = "cf_sql_date" value = "#POSTGRADFROM#" >,
														    <cfqueryparam cfsqltype = "cf_sql_date" value = "#POSTGRADTO#" >,
														    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#POSTGRADISGRAD#" >,
														    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#POSTGRADHONORS#" >                     
														 );                
                                          
                                    </cfquery>
                    <cfelse>
                    
                    </cfif>
                    
                        
                   <cfif (COLLEGESCHOOL NEQ "") AND (COLLEGESCHOOL NEQ "NULL") AND (COLLEGESCHOOL NEQ "NA") AND (COLLEGESCHOOL NEQ "N/A")>
                   
						<cfquery name="getschoolcode" datasource="#client.global_dsn#" maxrows="1">
							SELECT SCHOOLCODE FROM GLKSCHOOL
                             WHERE SCHOOLNAME = '#COLLEGESCHOOL#'
                             ;
                        </cfquery>
                        <cfset COLLEGESCHOOLC = '#getschoolcode.SCHOOLCODE#'>
                                    
						<cfquery name="geteduclevel" datasource="#client.global_dsn#" maxrows="1">
							SELECT DEGREECODE FROM GLKDEGREE
							WHERE DESCRIPTION = '#COLLEGEFIELD#'
							;
						</cfquery>
                        <cfset COLLEGEFIELD = '#geteduclevel.DEGREECODE#'>
                                    
						<cfquery name="getcoursecode" datasource="#client.global_dsn#" maxrows="1">
							SELECT COURSECODE FROM GLKCOURSE
							WHERE DESCRIPTION = '#COLLEGECOURSE#'
							;
						</cfquery>
                        <cfset COLLEGECOURSE = '#getcoursecode.COURSECODE#'>
                                   
                                   
                        <cfquery name="insert_to_CIN21EDUCATION" datasource="#client.company_dsn#">
                                        
                            INSERT INTO CIN21EDUCATION (    GUID,
															PERSONNELIDNO,
															SCHOOLNAME,    
															EDUCLEVEL,
															MAJORDEGREE,
															COURSECODE,
															SCHOOLCODE,
															DATEBEGIN,
															DATEFINISHED,
															GRADUATE,
															HONORSRECEIVED        
                                                                    )
                                                                
												 VALUES (   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
														    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
														    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#COLLEGESCHOOL#" >,
														    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "COLLEGE" >,
														    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#COLLEGEFIELD#" >,
														    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#COLLEGECOURSE#" >,
														    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#COLLEGESCHOOLC#" >,
														    <cfqueryparam cfsqltype = "cf_sql_date" value = "#COLLEGEFROM#" >,
														    <cfqueryparam cfsqltype = "cf_sql_date" value = "#COLLEGETO#" >,
														    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#COLLEGEISGRAD#" >,
														    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#COLLEGEHONORS#" >                     
														 );                
                                          
                                    </cfquery>
                   
                   <cfelse>
                   
                   </cfif>
                   
                   
                   <cfif (VOCATIONALSCHOOL NEQ "") AND (VOCATIONALSCHOOL NEQ "NULL") AND (VOCATIONALSCHOOL NEQ "NA") AND (VOCATIONALSCHOOL NEQ "N/A")>
                   
                        <cfquery name="getschoolcode" datasource="#client.global_dsn#" maxrows="1">
							SELECT SCHOOLCODE FROM GLKSCHOOL
                             WHERE SCHOOLNAME = '#VOCATIONALSCHOOL#'
                             ;
                        </cfquery>
                        <cfset VOCATIONALSCHOOLC = '#getschoolcode.SCHOOLCODE#'>
                                    
						<cfquery name="geteduclevel" datasource="#client.global_dsn#" maxrows="1">
							SELECT DEGREECODE FROM GLKDEGREE
							WHERE DESCRIPTION = '#VOCATIONALFIELD#'
							;
						</cfquery>
                        <cfset VOCATIONALFIELD = '#geteduclevel.DEGREECODE#'>
                                    
						<cfquery name="getcoursecode" datasource="#client.global_dsn#" maxrows="1">
							SELECT COURSECODE FROM GLKCOURSE
							WHERE DESCRIPTION = '#VOCATIONALCOURSE#'
							;
						</cfquery>
                        <cfset VOCATIONALCOURSE = '#getcoursecode.COURSECODE#'>
                                   
                                   
                        <cfquery name="insert_to_CIN21EDUCATION" datasource="#client.company_dsn#">
                                        
                            INSERT INTO CIN21EDUCATION (    GUID,
															PERSONNELIDNO,
															SCHOOLNAME,    
															EDUCLEVEL,
															MAJORDEGREE,
															COURSECODE,
															SCHOOLCODE,
															DATEBEGIN,
															DATEFINISHED,
															GRADUATE,
															HONORSRECEIVED        
                                                                    )
                                                                
												 VALUES (   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
														    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
														    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#VOCATIONALSCHOOL#" >,
														    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "VOCATIONAL" >,
														    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#VOCATIONALFIELD#" >,
														    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#VOCATIONALCOURSE#" >,
														    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#VOCATIONALSCHOOLC#" >,
														    <cfqueryparam cfsqltype = "cf_sql_date" value = "#VOCATIONALFROM#" >,
														    <cfqueryparam cfsqltype = "cf_sql_date" value = "#VOCATIONALTO#" >,
														    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#VOCATIONALISGRAD#" >,
														    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#VOCATIONALHONORS#" >                     
														 );                
                                          
                                    </cfquery>           
                   
                   <cfelse>
                   
                   </cfif>
                   
              
                  <cfif (SECONDARYSCHOOL NEQ "") AND (SECONDARYSCHOOL NEQ "NULL") AND (SECONDARYSCHOOL NEQ "NA") AND (SECONDARYSCHOOL NEQ "N/A")>
                 
						<cfquery name="getschoolcode" datasource="#client.global_dsn#" maxrows="1">
							SELECT SCHOOLCODE FROM GLKSCHOOL
                             WHERE SCHOOLNAME = '#SECONDARYSCHOOL#'
                             ;
                        </cfquery>
                        <cfset SECONDARYSCHOOLC = '#getschoolcode.SCHOOLCODE#'>
                                    
						<cfquery name="geteduclevel" datasource="#client.global_dsn#" maxrows="1">
							SELECT DEGREECODE FROM GLKDEGREE
							WHERE DESCRIPTION = '#SECONDARYFIELD#'
							;
						</cfquery>
                        <cfset SECONDARYFIELD = '#geteduclevel.DEGREECODE#'>
                                    
						<cfquery name="getcoursecode" datasource="#client.global_dsn#" maxrows="1">
							SELECT COURSECODE FROM GLKCOURSE
							WHERE DESCRIPTION = '#SECONDARYCOURSE#'
							;
						</cfquery>
                        <cfset SECONDARYCOURSE = '#getcoursecode.COURSECODE#'>
                                   
                                   
                        <cfquery name="insert_to_CIN21EDUCATION" datasource="#client.company_dsn#">
                                        
                            INSERT INTO CIN21EDUCATION (    GUID,
															PERSONNELIDNO,
															SCHOOLNAME,    
															EDUCLEVEL,
															MAJORDEGREE,
															COURSECODE,
															SCHOOLCODE,
															DATEBEGIN,
															DATEFINISHED,
															GRADUATE,
															HONORSRECEIVED        
                                                                    )
                                                                
												 VALUES (   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
														    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
														    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#SECONDARYSCHOOL#" >,
														    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "SECONDARY" >,
														    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#SECONDARYFIELD#" >,
														    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#SECONDARYCOURSE#" >,
														    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#SECONDARYSCHOOLC#" >,
														    <cfqueryparam cfsqltype = "cf_sql_date" value = "#SECONDARYFROM#" >,
														    <cfqueryparam cfsqltype = "cf_sql_date" value = "#SECONDARYTO#" >,
														    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#SECONDARYISGRAD#" >,
														    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#SECONDARYHONORS#" >                     
														 );                
                                          
                                    </cfquery>
                   
                   <cfelse>
                   
                   
                   </cfif>
                
                  
   <!---END FETCH TO CIN21EDUCATION-------------------------------------------------------------------------------------->



   <!---FETCH TO CIN21EMPEXTRA-------------------------------------------------------------------------------------->

             
                  			
					<cfloop query="query_from_grgpool">
					
							<cfset FIRSTEXTRAORGNAME        = '#FIRSTEXTRAORGNAME#'>
							<cfset FIRSTEXTRAORGIDATE       = '#FIRSTEXTRAORGIDATE#'>
							<cfset FIRSTEXTRAORGHIGHPOSHELD = '#FIRSTEXTRAORGHIGHPOSHELD#'>
                            <cfset SECONDEXTRAORGNAME       = '#SECONDEXTRAORGNAME#'>
							<cfset SECONDEXTRAORGIDATE      = '#SECONDEXTRAORGIDATE#'>
							<cfset SECONDEXTRAORGHIGHPOSHELD= '#SECONDEXTRAORGHIGHPOSHELD#'>
                            <cfset THIRDEXTRAORGNAME        = '#THIRDEXTRAORGNAME#'>
							<cfset THIRDEXTRAORGIDATE       = '#THIRDEXTRAORGIDATE#'>
							<cfset THIRDEXTRAORGHIGHPOSHELD = '#THIRDEXTRAORGHIGHPOSHELD#'>
                            <cfset FOURTHEXTRAORGNAME       = '#FOURTHEXTRAORGNAME#'>
							<cfset FOURTHEXTRAORGIDATE      = '#FOURTHEXTRAORGIDATE#'>
							<cfset FOURTHEXTRAORGHIGHPOSHELD= '#FOURTHEXTRAORGHIGHPOSHELD#'>
                            <cfset FIFTHEXTRAORGNAME        = '#FIFTHEXTRAORGNAME#'>
							<cfset FIFTHEXTRAORGIDATE       = '#FIFTHEXTRAORGIDATE#'>
							<cfset FIFTHEXTRAORGHIGHPOSHELD = '#FIFTHEXTRAORGHIGHPOSHELD#'>
	
	
					</cfloop>
													
				   <cfif (FIRSTEXTRAORGNAME NEQ "") AND (FIRSTEXTRAORGNAME NEQ "NULL") AND (FIRSTEXTRAORGNAME NEQ "NA") AND (FIRSTEXTRAORGNAME NEQ "N/A")>
                   
                        <cfquery name="insert_to_CIN21EMPEXTRA" datasource="#client.company_dsn#">
                                INSERT INTO CIN21EMPEXTRA  (    GUID,
																PERSONNELIDNO,
                                                                ORGANIZATION,
                                                                PERIODCOVERED,
                                                                HIGHESTPOSITION
                                                           )
                                                           
													 VALUES (   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
															    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#FIRSTEXTRAORGNAME#" >,
															    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "" >,
															    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#FIRSTEXTRAORGHIGHPOSHELD#" >
															);    
                                  
                   	    </cfquery>
                   
                   <cfelse>
                   
                   </cfif>
                   
				   <cfif (SECONDEXTRAORGNAME NEQ "") AND (SECONDEXTRAORGNAME NEQ "NULL") AND (SECONDEXTRAORGNAME NEQ "NA") AND (SECONDEXTRAORGNAME NEQ "N/A")>
                   
                        <cfquery name="insert_to_CIN21EMPEXTRA" datasource="#client.company_dsn#">
                                INSERT INTO CIN21EMPEXTRA  (    GUID,
																PERSONNELIDNO,
                                                                ORGANIZATION,
                                                                PERIODCOVERED,
                                                                HIGHESTPOSITION
                                                           )
                                                           
													 VALUES (   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
															    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#SECONDEXTRAORGNAME#" >,
															    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "" >,
															    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#SECONDEXTRAORGHIGHPOSHELD#" >
															);    
                                  
                   	    </cfquery>
                   
                   <cfelse>
                   
                   </cfif>
				   
				   <cfif (THIRDEXTRAORGNAME NEQ "") AND (THIRDEXTRAORGNAME NEQ "NULL") AND (THIRDEXTRAORGNAME NEQ "NA") AND (THIRDEXTRAORGNAME NEQ "N/A")>
                   
                        <cfquery name="insert_to_CIN21EMPEXTRA" datasource="#client.company_dsn#">
                                INSERT INTO CIN21EMPEXTRA  (    GUID,
																PERSONNELIDNO,
                                                                ORGANIZATION,
                                                                PERIODCOVERED,
                                                                HIGHESTPOSITION
                                                           )
                                                           
													 VALUES (   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
															    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#THIRDEXTRAORGNAME#" >,
															    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "" >,
															    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#THIRDEXTRAORGHIGHPOSHELD#" >
															);    
                                  
                   	    </cfquery>
                   
                   <cfelse>
                   
                   </cfif>
				   
				   <cfif (FOURTHEXTRAORGNAME NEQ "") AND (FOURTHEXTRAORGNAME NEQ "NULL") AND (FOURTHEXTRAORGNAME NEQ "NA") AND (FOURTHEXTRAORGNAME NEQ "N/A")>
                   
                        <cfquery name="insert_to_CIN21EMPEXTRA" datasource="#client.company_dsn#">
                                INSERT INTO CIN21EMPEXTRA  (    GUID,
																PERSONNELIDNO,
                                                                ORGANIZATION,
                                                                PERIODCOVERED,
                                                                HIGHESTPOSITION
                                                           )
                                                           
													 VALUES (   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
															    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#FOURTHEXTRAORGNAME#" >,
															    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "" >,
															    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#FOURTHEXTRAORGHIGHPOSHELD#" >
															);    
                                  
                   	    </cfquery>
                   
                   <cfelse>
                   
                   </cfif>
				   
				   <cfif (FIFTHEXTRAORGNAME NEQ "") AND (FIFTHEXTRAORGNAME NEQ "NULL") AND (FIFTHEXTRAORGNAME NEQ "NA") AND (FIFTHEXTRAORGNAME NEQ "N/A")>
                   
                        <cfquery name="insert_to_CIN21EMPEXTRA" datasource="#client.company_dsn#">
                                INSERT INTO CIN21EMPEXTRA  (    GUID,
																PERSONNELIDNO,
                                                                ORGANIZATION,
                                                                PERIODCOVERED,
                                                                HIGHESTPOSITION
                                                           )
                                                           
													 VALUES (   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
															    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#FIFTHEXTRAORGNAME#" >,
															    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "" >,
															    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#FIFTHEXTRAORGHIGHPOSHELD#" >
															);    
                                  
                   	    </cfquery>
                   
                   <cfelse>
                   
                   </cfif>
        		   
   <!---END FETCH TO CIN21EMPEXTRA-------------------------------------------------------------------------------------->

                   
     
   <!---FETCH TO CIN21EXAMPASS-------------------------------------------------------------------------------------->

                   
                   						
					<cfloop query="query_from_grgpool">
					
							<cfset FIRSTGOVEXAMPASSED = '#FIRSTGOVEXAMPASSED#'>
							<cfset FIRSTGOVEXAMDATE   = '#FIRSTGOVEXAMDATE#'>
                            <cfset FIRSTGOVEXAMRATING = '#FIRSTGOVEXAMRATING#'>
							
                            <cfset SECONDGOVEXAMPASSED= '#SECONDGOVEXAMPASSED#'>
							<cfset SECONDGOVEXAMDATE  = '#SECONDGOVEXAMDATE#'>
                            <cfset SECONDGOVEXAMRATING= '#SECONDGOVEXAMRATING#'>

							<cfset THIRDGOVEXAMPASSED = '#THIRDGOVEXAMPASSED#'>
							<cfset THIRDGOVEXAMDATE   = '#THIRDGOVEXAMDATE#'>
                            <cfset THIRDGOVEXAMRATING = '#THIRDGOVEXAMRATING#'>
							
							<cfset FOURTHGOVEXAMPASSED= '#FOURTHGOVEXAMPASSED#'>
							<cfset FOURTHGOVEXAMDATE  = '#FOURTHGOVEXAMDATE#'>
                            <cfset FOURTHGOVEXAMRATING= '#FOURTHGOVEXAMRATING#'>
							
					</cfloop>
													
				   <cfif (FIRSTGOVEXAMPASSED NEQ "") AND (FIRSTGOVEXAMPASSED NEQ "NULL") AND (FIRSTGOVEXAMPASSED NEQ "NA") AND (FIRSTGOVEXAMPASSED NEQ "N/A")>
                   
                   		<cfquery name="insert_to_CIN21EXAMPASS" datasource="#client.company_dsn#">
                                INSERT INTO CIN21EXAMPASS (     GUID,
																PERSONNELIDNO,
																DATETAKENPASSED,
                                                                PASSED,
                                                                RATING,
                                                                TYPEOFEXAM			
                                                                    
                                                          )
													 VALUES (   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
																<cfqueryparam cfsqltype = "cf_sql_date" value = "#FIRSTGOVEXAMDATE#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#FIRSTGOVEXAMRATING#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#FIRSTGOVEXAMPASSED#" >
															);                
                    	</cfquery>
                   
                   <cfelse>
                   
                   </cfif>
                   
                   <cfif (SECONDGOVEXAMPASSED NEQ "") AND (SECONDGOVEXAMPASSED NEQ "NULL") AND (SECONDGOVEXAMPASSED NEQ "NA") AND (SECONDGOVEXAMPASSED NEQ "N/A")>
                   
                   		<cfquery name="insert_to_CIN21EXAMPASS" datasource="#client.company_dsn#">
                                INSERT INTO CIN21EXAMPASS (     GUID,
																PERSONNELIDNO,
																DATETAKENPASSED,
                                                                PASSED,
                                                                RATING,
                                                                TYPEOFEXAM			
                                                                    
                                                          )
													 VALUES (   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
																<cfqueryparam cfsqltype = "cf_sql_date" value = "#SECONDGOVEXAMDATE#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#SECONDGOVEXAMRATING#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#SECONDGOVEXAMPASSED#" >
															);                
                    	</cfquery>
                   
                   <cfelse>
                   
                   </cfif> 
                   
                   <cfif (THIRDGOVEXAMPASSED NEQ "") AND (THIRDGOVEXAMPASSED NEQ "NULL") AND (THIRDGOVEXAMPASSED NEQ "NA") AND (THIRDGOVEXAMPASSED NEQ "N/A")>
                   
                   		<cfquery name="insert_to_CIN21EXAMPASS" datasource="#client.company_dsn#">
                                INSERT INTO CIN21EXAMPASS (     GUID,
																PERSONNELIDNO,
																DATETAKENPASSED,
                                                                PASSED,
                                                                RATING,
                                                                TYPEOFEXAM			
                                                                    
                                                          )
													 VALUES (   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
																<cfqueryparam cfsqltype = "cf_sql_date" value = "#THIRDGOVEXAMDATE#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#THIRDGOVEXAMRATING#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#THIRDGOVEXAMPASSED#" >
															);                
                    	</cfquery>
                   
                   <cfelse>
                   
                   </cfif>
				   
				   <cfif (FOURTHGOVEXAMPASSED NEQ "") AND (FOURTHGOVEXAMPASSED NEQ "NULL") AND (FOURTHGOVEXAMPASSED NEQ "NA") AND (FOURTHGOVEXAMPASSED NEQ "N/A")>
                   
                   		<cfquery name="insert_to_CIN21EXAMPASS" datasource="#client.company_dsn#">
                                INSERT INTO CIN21EXAMPASS (     GUID,
																PERSONNELIDNO,
																DATETAKENPASSED,
                                                                PASSED,
                                                                RATING,
                                                                TYPEOFEXAM			
                                                                    
                                                          )
													 VALUES (   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
																<cfqueryparam cfsqltype = "cf_sql_date" value = "#FOURTHGOVEXAMDATE#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#FOURTHGOVEXAMRATING#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#FOURTHGOVEXAMPASSED#" >
															);                
                    	</cfquery>
                   
                   <cfelse>
                   
                   </cfif>
					                      
   <!---END FETCH TO CIN21EXAMPASS-------------------------------------------------------------------------------------->


<!--- BOARD EXAM RESULTS AND RATINGS CIN21ACHIEVEMENTS--->

					<cfloop query="query_from_grgpool">
					
							<cfset BOARDEXAMRESULT = '#BOARDEXAMRESULT#'>
							<cfset LICENSECERT     = '#LICENSECERT#'>
                            
					</cfloop>
					
					<cfif (BOARDEXAMRESULT NEQ "") AND (BOARDEXAMRESULT NEQ "NULL") AND (BOARDEXAMRESULT NEQ "NA") AND (BOARDEXAMRESULT NEQ "N/A")>
                   
                   		<cfquery name="insert_to_CIN21ACHIEVEMENTS" datasource="#client.company_dsn#">
							INSERT INTO CIN21ACHIEVEMENTS ( GUID,
															PERSONNELIDNO,
															AWARDTITLE,
															DATEGIVEN,
															NATURECATEGORY		
																
													      )
												 VALUES  (  <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
															<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
															<cfqueryparam cfsqltype = "cf_sql_varchar" value = "BOARD EXAM RESULTS AND RATINGS" >,
															<cfqueryparam cfsqltype = "cf_sql_varchar" value = "_" >,
															<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#BOARDEXAMRESULT#" >
														 );                
                    	</cfquery>
                   
                   <cfelse>
                   
                   </cfif>
				   
				   <cfif (LICENSECERT NEQ "") AND (LICENSECERT NEQ "NULL") AND (LICENSECERT NEQ "NA") AND (LICENSECERT NEQ "N/A")>
                   
                   		<cfquery name="insert_to_CIN21ACHIEVEMENTS" datasource="#client.company_dsn#">
							INSERT INTO CIN21ACHIEVEMENTS ( GUID,
															PERSONNELIDNO,
															AWARDTITLE,
															DATEGIVEN,
															NATURECATEGORY		
																
													      )
												 VALUES  (  <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
															<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
															<cfqueryparam cfsqltype = "cf_sql_varchar" value = "LICENSE AND CERTIFICATION OF PRESENT PROFESSION" >,
															<cfqueryparam cfsqltype = "cf_sql_varchar" value = "_" >,
															<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#LICENSECERT#" >
														 );                
                    	</cfquery>
                   
                   <cfelse>
                   
                   </cfif>

<!--- END BOARD EXAM RESULTS AND RATINGS--->

<!---LICENSE AND CERTIFICATION OF PRESENT PROFESSION--->

<!---END LICENSE AND CERTIFICATION OF PRESENT PROFESSION--->

<!---BLOOD TYPE CIN21MEDHISTORY--->
		<cfloop query="query_from_grgpool">
					
				<cfset BLOODTYPE = '#BLOODTYPE#'>
				
		</cfloop>
		
		<cfif (BLOODTYPE NEQ "") AND (BLOODTYPE NEQ "NULL") AND (BLOODTYPE NEQ "NA") AND (BLOODTYPE NEQ "N/A")>
                   
			<cfquery name="insert_to_CIN21MEDHISTORY" datasource="#client.company_dsn#">
				INSERT INTO CIN21MEDHISTORY (   GUID,
												PERSONNELIDNO,
												BLOODTYPE		
													
											  )
									 VALUES  (  <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
												<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
												<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#BLOODTYPE#" >
											 );                
			</cfquery>
	   
	   <cfelse>
	   
	   </cfif>


<!---END BLOOD TYPE--->
 
 
 
  <!---FETCH TO CIN21TRAINING-------------------------------------------------------------------------------------->
                
				    
                   
                	<cfloop query="query_from_grgpool">
					
							<cfset FIRSTSEMINARTOPIC         = '#FIRSTSEMINARTOPIC#'>
							<cfset FIRSTSEMINARDATE          = '#FIRSTSEMINARDATE#'>
							<cfset FIRSTSEMINARORGANIZER     = '#FIRSTSEMINARORGANIZER#'>
							
                            <cfset SECONDSEMINARTOPIC        = '#SECONDSEMINARTOPIC#'>
							<cfset SECONDSEMINARDATE         = '#SECONDSEMINARDATE#'>
							<cfset SECONDSEMINARORGANIZER    = '#SECONDSEMINARORGANIZER#'>
                            
                            <cfset THIRDSEMINARTOPIC         = '#THIRDSEMINARTOPIC#'>
							<cfset THIRDSEMINARDATE          = '#THIRDSEMINARDATE#'>
							<cfset THIRDSEMINARORGANIZER     = '#THIRDSEMINARORGANIZER#'>
                            
                            <cfset FOURTHSEMINARTOPIC        = '#FOURTHSEMINARTOPIC#'>
							<cfset FOURTHSEMINARDATE         = '#FOURTHSEMINARDATE#'>
							<cfset FOURTHSEMINARORGANIZER    = '#FOURTHSEMINARORGANIZER#'>
                            
                            <cfset FIFTHSEMINARTOPIC         = '#FIFTHSEMINARTOPIC#'>
							<cfset FIFTHSEMINARDATE          = '#FIFTHSEMINARDATE#'>
							<cfset FIFTHSEMINARORGANIZER     = '#FIFTHSEMINARORGANIZER#'>
                            
                            <cfset SIXTHSEMINARTOPIC         = '#SIXTHSEMINARTOPIC#'>
							<cfset SIXTHSEMINARDATE          = '#SIXTHSEMINARDATE#'>
							<cfset SIXTHSEMINARORGANIZER     = '#SIXTHSEMINARORGANIZER#'>
							
							
					</cfloop>
													
				    <cfif (FIRSTSEMINARTOPIC NEQ "") AND (FIRSTSEMINARTOPIC NEQ "NA") AND (FIRSTSEMINARTOPIC NEQ "N/A")>
                   
                   		<cfquery name="insert_to_CIN21TRAINING" datasource="#client.company_dsn#">
                                
                                INSERT INTO CIN21TRAINING  (    GUID,
																PERSONNELIDNO,
																INCLUSIVEDATE,
																TOPIC,
																REMARKS
														    )
													VALUES (    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#FIRSTSEMINARDATE#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#FIRSTSEMINARTOPIC#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#FIRSTSEMINARORGANIZER#" >
															);                
                                  
                        </cfquery>
                   
                    <cfelse>
                   
                    </cfif>
					
					<cfif (SECONDSEMINARTOPIC NEQ "") AND (SECONDSEMINARTOPIC NEQ "NA") AND (SECONDSEMINARTOPIC NEQ "N/A")>
                   
                   		<cfquery name="insert_to_CIN21TRAINING" datasource="#client.company_dsn#">

                                
                                INSERT INTO CIN21TRAINING  (    GUID,
																PERSONNELIDNO,
																INCLUSIVEDATE,
																TOPIC,
																REMARKS
														    )
													VALUES (    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#SECONDSEMINARDATE#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#SECONDSEMINARTOPIC#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#SECONDSEMINARORGANIZER#" >
															);                
                                  
                        </cfquery>
                   
                    <cfelse>
                   
                    </cfif>
					
					<cfif (THIRDSEMINARTOPIC NEQ "") AND (THIRDSEMINARTOPIC NEQ "NA") AND (THIRDSEMINARTOPIC NEQ "N/A")>
                   
                   		<cfquery name="insert_to_CIN21TRAINING" datasource="#client.company_dsn#">
                                
                                INSERT INTO CIN21TRAINING  (    GUID,
																PERSONNELIDNO,
																INCLUSIVEDATE,
																TOPIC,
																REMARKS
														    )
													VALUES (    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#THIRDSEMINARDATE#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#THIRDSEMINARTOPIC#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#THIRDSEMINARORGANIZER#" >
															);                
                                  
                        </cfquery>
                   
                    <cfelse>
                   
                    </cfif>
					
					<cfif (FOURTHSEMINARTOPIC NEQ "") AND (FOURTHSEMINARTOPIC NEQ "NA") AND (FOURTHSEMINARTOPIC NEQ "N/A")>
                   
                   		<cfquery name="insert_to_CIN21TRAINING" datasource="#client.company_dsn#">
                                
                                INSERT INTO CIN21TRAINING  (    GUID,
																PERSONNELIDNO,
																INCLUSIVEDATE,
																TOPIC,
																REMARKS
														    )
													VALUES (    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#FOURTHSEMINARDATE#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#FOURTHSEMINARTOPIC#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#FOURTHSEMINARORGANIZER#" >
															);                
                                  
                        </cfquery>
                   
                    <cfelse>
                   
                    </cfif>
					
					<cfif (FIFTHSEMINARTOPIC NEQ "") AND (FIFTHSEMINARTOPIC NEQ "NA") AND (FIFTHSEMINARTOPIC NEQ "N/A")>
                   
                   		<cfquery name="insert_to_CIN21TRAINING" datasource="#client.company_dsn#">
                                
                                INSERT INTO CIN21TRAINING  (    GUID,
																PERSONNELIDNO,
																INCLUSIVEDATE,
																TOPIC,
																REMARKS
														    )
													VALUES (    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#FIFTHSEMINARDATE#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#FIFTHSEMINARTOPIC#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#FIFTHSEMINARORGANIZER#" >
															);                
                                  
                        </cfquery>
                   
                    <cfelse>
                   
                    </cfif>
					
					<cfif (SIXTHSEMINARTOPIC NEQ "") AND (SIXTHSEMINARTOPIC NEQ "NA") AND (SIXTHSEMINARTOPIC NEQ "N/A")>
                   
                   		<cfquery name="insert_to_CIN21TRAINING" datasource="#client.company_dsn#">
                                
                                INSERT INTO CIN21TRAINING  (    GUID,
																PERSONNELIDNO,
																INCLUSIVEDATE,
																TOPIC,     
																REMARKS
														    )
													VALUES (    <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#SIXTHSEMINARDATE#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#SIXTHSEMINARTOPIC#" >,
																<cfqueryparam cfsqltype = "cf_sql_varchar" value = "#SIXTHSEMINARORGANIZER#" >
															);                
                                  
                        </cfquery>
                   
                    <cfelse>
                   
                    </cfif>
                   
                  
				    
                   
   <!---END FETCH TO CIN21TRAINING-------------------------------------------------------------------------------------->


	<!---FETCH TO CIN21WORKHISTORY-------------------------------------------------------------------------------------->

                   
                    <cfloop query="query_from_grgpool">
                    
							<cfset FIRSTEMPHISTORYNAME          = '#FIRSTEMPHISTORYNAME#'>	
							<cfset FIRSTEMPHISTORYADDRESS       = '#FIRSTEMPHISTORYADDRESS# #FIRSTEMPHISTORYPOSITION# #FIRSTEMPHISTORYCONTACTNO#'>	
					      	<cfset FIRSTEMPHISTORYDATEEMP       = '#FIRSTEMPHISTORYDATEEMP#'>
                            <cfset FIRSTEMPHISTORYDATESEP       = '#FIRSTEMPHISTORYDATESEP#'>
                            <cfset FIRSTEMPHISTORYINISALARY     = '#FIRSTEMPHISTORYINISALARY#'>
							<cfset FIRSTEMPHISTORYLASTSALARY    = '#FIRSTEMPHISTORYLASTSALARY#'>
							<cfset FIRSTEMPHISTORYLASTPOS       = '#FIRSTEMPHISTORYLASTPOS#'>
							<cfset FIRSTEMPHISTORYSUPERIOR      = '#FIRSTEMPHISTORYSUPERIOR#'>
							<cfset FIRSTEMPHISTORYLEAVEREASONS  = '#FIRSTEMPHISTORYLEAVEREASONS#'>
						 
						
					</cfloop>
													
				   	<cfif (FIRSTEMPHISTORYNAME NEQ "") AND (FIRSTEMPHISTORYNAME NEQ "NA") AND (FIRSTEMPHISTORYNAME NEQ "N/A")>
                    
                    	<cfquery name="insert_to_CIN21WORKHISTORY" datasource="#client.company_dsn#">
                    
                                INSERT INTO CIN21WORKHISTORY ( GUID,
															   PERSONNELIDNO,
                                                               ENTITYCODE,
															   MAINDUTIES,
                                                               DATEHIRED,
                                                               SEPARATIONDATE,
                                                               WORKSTARTINGSALARY,
                                                               WORKENDINGSALARY,
                                                               LASTPOSITIONHELD,
                                                               SUPERIOR,
                                                               REASONFORLEAVING 
														     )
												   VALUES    ( <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
															   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
															   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#FIRSTEMPHISTORYNAME#" >,
															   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#FIRSTEMPHISTORYADDRESS#" >,
															   <cfqueryparam cfsqltype = "cf_sql_date" value = "#FIRSTEMPHISTORYDATEEMP#" >,
															   <cfqueryparam cfsqltype = "cf_sql_date" value = "#FIRSTEMPHISTORYDATESEP#" >,
															   <cfqueryparam cfsqltype = "cf_sql_integer" value = "#FIRSTEMPHISTORYINISALARY#" >,
															   <cfqueryparam cfsqltype = "cf_sql_integer" value = "#FIRSTEMPHISTORYLASTSALARY#" >,
															   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#FIRSTEMPHISTORYLASTPOS#" >,
															   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#FIRSTEMPHISTORYSUPERIOR#" >,
															   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#FIRSTEMPHISTORYLEAVEREASONS#" >
															 
															 );                
                                  
                    	</cfquery>
					
					<cfelse>
                    
                    </cfif>
                    
                    
					<cfloop query="query_from_grgpool">
                    
							<cfset SECONDEMPHISTORYNAME          = '#SECONDEMPHISTORYNAME#'>	
							<cfset SECONDEMPHISTORYADDRESS       = '#SECONDEMPHISTORYADDRESS# #SECONDEMPHISTORYPOSITION# #SECONDEMPHISTORYCONTACTNO#'>	
					      	<cfset SECONDEMPHISTORYDATEEMP       = '#SECONDEMPHISTORYDATEEMP#'>
                            <cfset SECONDEMPHISTORYDATESEP       = '#SECONDEMPHISTORYDATESEP#'>
                            <cfset SECONDEMPHISTORYINISALARY     = '#SECONDEMPHISTORYINISALARY#'>
							<cfset SECONDEMPHISTORYLASTSALARY    = '#SECONDEMPHISTORYLASTSALARY#'>
							<cfset SECONDEMPHISTORYLASTPOS       = '#SECONDEMPHISTORYLASTPOS#'>
							<cfset SECONDEMPHISTORYSUPERIOR      = '#SECONDEMPHISTORYSUPERIOR#'>
							<cfset SECONDEMPHISTORYLEAVEREASONS  = '#SECONDEMPHISTORYLEAVEREASONS#'>
						 
						
					</cfloop>
													
				   	<cfif (SECONDEMPHISTORYNAME NEQ "") AND (SECONDEMPHISTORYNAME NEQ "NA") AND (SECONDEMPHISTORYNAME NEQ "N/A")>
                    
                    	<cfquery name="insert_to_CIN21WORKHISTORY" datasource="#client.company_dsn#">
                    
                                INSERT INTO CIN21WORKHISTORY ( GUID,
															   PERSONNELIDNO,
                                                               ENTITYCODE,
															   MAINDUTIES,
                                                               DATEHIRED,
                                                               SEPARATIONDATE,
                                                               WORKSTARTINGSALARY,
                                                               WORKENDINGSALARY,
                                                               LASTPOSITIONHELD,
                                                               SUPERIOR,
                                                               REASONFORLEAVING 
														     )
												   VALUES    ( <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
															   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
															   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#SECONDEMPHISTORYNAME#" >,
															   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#SECONDEMPHISTORYADDRESS#" >,
															   <cfqueryparam cfsqltype = "cf_sql_date" value = "#SECONDEMPHISTORYDATEEMP#" >,
															   <cfqueryparam cfsqltype = "cf_sql_date" value = "#SECONDEMPHISTORYDATESEP#" >,
															   <cfqueryparam cfsqltype = "cf_sql_integer" value = "#SECONDEMPHISTORYINISALARY#" >,
															   <cfqueryparam cfsqltype = "cf_sql_integer" value = "#SECONDEMPHISTORYLASTSALARY#" >,
															   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#SECONDEMPHISTORYLASTPOS#" >,
															   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#SECONDEMPHISTORYSUPERIOR#" >,
															   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#SECONDEMPHISTORYLEAVEREASONS#" >
															 
															 );                
                                  
                    	</cfquery>
					
					<cfelse>
                    
                    </cfif>
                   
				   
				   <cfloop query="query_from_grgpool">
                    
							<cfset THIRDEMPHISTORYNAME          = '#THIRDEMPHISTORYNAME#'>	
							<cfset THIRDEMPHISTORYADDRESS       = '#THIRDEMPHISTORYADDRESS# #THIRDEMPHISTORYPOSITION# #THIRDEMPHISTORYCONTACTNO#'>	
					      	<cfset THIRDEMPHISTORYDATEEMP       = '#THIRDEMPHISTORYDATEEMP#'>
                            <cfset THIRDEMPHISTORYDATESEP       = '#THIRDEMPHISTORYDATESEP#'>
                            <cfset THIRDEMPHISTORYINISALARY     = '#THIRDEMPHISTORYINISALARY#'>
							<cfset THIRDEMPHISTORYLASTSALARY    = '#THIRDEMPHISTORYLASTSALARY#'>
							<cfset THIRDEMPHISTORYLASTPOS       = '#THIRDEMPHISTORYLASTPOS#'>
							<cfset THIRDEMPHISTORYSUPERIOR      = '#THIRDEMPHISTORYSUPERIOR#'>
							<cfset THIRDEMPHISTORYLEAVEREASONS  = '#THIRDEMPHISTORYLEAVEREASONS#'>
						 
						
					</cfloop>
													
				   	<cfif (THIRDEMPHISTORYNAME NEQ "") AND (THIRDEMPHISTORYNAME NEQ "NA") AND (THIRDEMPHISTORYNAME NEQ "N/A")>
                    
                    	<cfquery name="insert_to_CIN21WORKHISTORY" datasource="#client.company_dsn#">
                    
                                INSERT INTO CIN21WORKHISTORY ( GUID,
															   PERSONNELIDNO,
                                                               ENTITYCODE,
															   MAINDUTIES,
                                                               DATEHIRED,
                                                               SEPARATIONDATE,
                                                               WORKSTARTINGSALARY,
                                                               WORKENDINGSALARY,
                                                               LASTPOSITIONHELD,
                                                               SUPERIOR,
                                                               REASONFORLEAVING 
														     )
												   VALUES    ( <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
															   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
															   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#THIRDEMPHISTORYNAME#" >,
															   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#THIRDEMPHISTORYADDRESS#" >,
															   <cfqueryparam cfsqltype = "cf_sql_date" value = "#THIRDEMPHISTORYDATEEMP#" >,
															   <cfqueryparam cfsqltype = "cf_sql_date" value = "#THIRDEMPHISTORYDATESEP#" >,
															   <cfqueryparam cfsqltype = "cf_sql_integer" value = "#THIRDEMPHISTORYINISALARY#" >,
															   <cfqueryparam cfsqltype = "cf_sql_integer" value = "#THIRDEMPHISTORYLASTSALARY#" >,
															   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#THIRDEMPHISTORYLASTPOS#" >,
															   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#THIRDEMPHISTORYSUPERIOR#" >,
															   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#THIRDEMPHISTORYLEAVEREASONS#" >
															 
															 );                
                                  
                    	</cfquery>
					
					<cfelse>
                    
                    </cfif>
					
					<cfloop query="query_from_grgpool">
                    
							<cfset FOURTHEMPHISTORYNAME          = '#FOURTHEMPHISTORYNAME#'>	
							<cfset FOURTHEMPHISTORYADDRESS       = '#FOURTHEMPHISTORYADDRESS# #FOURTHEMPHISTORYPOSITION# #FOURTHEMPHISTORYCONTACTNO#'>	
					      	<cfset FOURTHEMPHISTORYDATEEMP       = '#FOURTHEMPHISTORYDATEEMP#'>
                            <cfset FOURTHEMPHISTORYDATESEP       = '#FOURTHEMPHISTORYDATESEP#'>
                            <cfset FOURTHEMPHISTORYINISALARY     = '#FOURTHEMPHISTORYINISALARY#'>
							<cfset FOURTHEMPHISTORYLASTSALARY    = '#FOURTHEMPHISTORYLASTSALARY#'>
							<cfset FOURTHEMPHISTORYLASTPOS       = '#FOURTHEMPHISTORYLASTPOS#'>
							<cfset FOURTHEMPHISTORYSUPERIOR      = '#FOURTHEMPHISTORYSUPERIOR#'>
							<cfset FOURTHEMPHISTORYLEAVEREASONS  = '#FOURTHEMPHISTORYLEAVEREASONS#'>
						 
						
					</cfloop>
													
				   	<cfif (FOURTHEMPHISTORYNAME NEQ "") AND (FOURTHEMPHISTORYNAME NEQ "NA") AND (FOURTHEMPHISTORYNAME NEQ "N/A")>
                    
                    	<cfquery name="insert_to_CIN21WORKHISTORY" datasource="#client.company_dsn#">
                    
                                INSERT INTO CIN21WORKHISTORY ( GUID,
															   PERSONNELIDNO,
                                                               ENTITYCODE,
															   MAINDUTIES,
                                                               DATEHIRED,
                                                               SEPARATIONDATE,
                                                               WORKSTARTINGSALARY,
                                                               WORKENDINGSALARY,
                                                               LASTPOSITIONHELD,
                                                               SUPERIOR,
                                                               REASONFORLEAVING 
														     )
												   VALUES    ( <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
															   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
															   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#FOURTHEMPHISTORYNAME#" >,
															   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#FOURTHEMPHISTORYADDRESS#" >,
															   <cfqueryparam cfsqltype = "cf_sql_date" value = "#FOURTHEMPHISTORYDATEEMP#" >,
															   <cfqueryparam cfsqltype = "cf_sql_date" value = "#FOURTHEMPHISTORYDATESEP#" >,
															   <cfqueryparam cfsqltype = "cf_sql_integer" value = "#FOURTHEMPHISTORYINISALARY#" >,
															   <cfqueryparam cfsqltype = "cf_sql_integer" value = "#FOURTHEMPHISTORYLASTSALARY#" >,
															   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#FOURTHEMPHISTORYLASTPOS#" >,
															   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#FOURTHEMPHISTORYSUPERIOR#" >,
															   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#FOURTHEMPHISTORYLEAVEREASONS#" >
															 
															 );                
                                  
                    	</cfquery>
					
					<cfelse>
                    
                    </cfif>
					
					
					<cfloop query="query_from_grgpool">
                    
							<cfset FIFTHEMPHISTORYNAME          = '#FIFTHEMPHISTORYNAME#'>	
							<cfset FIFTHEMPHISTORYADDRESS       = '#FIFTHEMPHISTORYADDRESS# #FIFTHEMPHISTORYPOSITION# #FIFTHEMPHISTORYCONTACTNO#'>	
					      	<cfset FIFTHEMPHISTORYDATEEMP       = '#FIFTHEMPHISTORYDATEEMP#'>
                            <cfset FIFTHEMPHISTORYDATESEP       = '#FIFTHEMPHISTORYDATESEP#'>
                            <cfset FIFTHEMPHISTORYINISALARY     = '#FIFTHEMPHISTORYINISALARY#'>
							<cfset FIFTHEMPHISTORYLASTSALARY    = '#FIFTHEMPHISTORYLASTSALARY#'>
							<cfset FIFTHEMPHISTORYLASTPOS       = '#FIFTHEMPHISTORYLASTPOS#'>
							<cfset FIFTHEMPHISTORYSUPERIOR      = '#FIFTHEMPHISTORYSUPERIOR#'>
							<cfset FIFTHEMPHISTORYLEAVEREASONS  = '#FIFTHEMPHISTORYLEAVEREASONS#'>
						 
						
					</cfloop>
													
				   	<cfif (FIFTHEMPHISTORYNAME NEQ "") AND (FIFTHEMPHISTORYNAME NEQ "NA") AND (FIFTHEMPHISTORYNAME NEQ "N/A")>
                    
                    	<cfquery name="insert_to_CIN21WORKHISTORY" datasource="#client.company_dsn#">
                    
                                INSERT INTO CIN21WORKHISTORY ( GUID,
															   PERSONNELIDNO,
                                                               ENTITYCODE,
															   MAINDUTIES,
                                                               DATEHIRED,
                                                               SEPARATIONDATE,
                                                               WORKSTARTINGSALARY,
                                                               WORKENDINGSALARY,
                                                               LASTPOSITIONHELD,
                                                               SUPERIOR,
                                                               REASONFORLEAVING 
														     )
												   VALUES    ( <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
															   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
															   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#FIFTHEMPHISTORYNAME#" >,
															   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#FIFTHEMPHISTORYADDRESS#" >,
															   <cfqueryparam cfsqltype = "cf_sql_date" value = "#FIFTHEMPHISTORYDATEEMP#" >,
															   <cfqueryparam cfsqltype = "cf_sql_date" value = "#FIFTHEMPHISTORYDATESEP#" >,
															   <cfqueryparam cfsqltype = "cf_sql_integer" value = "#FIFTHEMPHISTORYINISALARY#" >,
															   <cfqueryparam cfsqltype = "cf_sql_integer" value = "#FIFTHEMPHISTORYLASTSALARY#" >,
															   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#FIFTHEMPHISTORYLASTPOS#" >,
															   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#FIFTHEMPHISTORYSUPERIOR#" >,
															   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#FIFTHEMPHISTORYLEAVEREASONS#" >
															 
															 );                
                                  
                    	</cfquery>
					
					<cfelse>
                    
                    </cfif>
                    
                   
   <!---END FETCH TO CIN21WORKHISTORY-------------------------------------------------------------------------------------->

    
 <!---Relatives friends working in Filinvet CIN21RELATIVE--->
	<cfloop query="query_from_grgpool">
                    
			<cfset RELWORKINNAMEONE           = '#RELWORKINNAMEONE#'>	
			<cfset RELWORKINCOMPONE           = '#RELWORKINCOMPONE#'>	
			<cfset RELWORKINAFINITYONE        = '#RELWORKINAFINITYONE#'>
			
			<cfset RELWORKINNAMETWO           = '#RELWORKINNAMETWO#'>	
			<cfset RELWORKINCOMPTWO           = '#RELWORKINCOMPTWO#'>	
			<cfset RELWORKINAFINITYTWO        = '#RELWORKINAFINITYTWO#'>
			
			<cfset RELWORKINNAMETHREE           = '#RELWORKINNAMETHREE#'>	
			<cfset RELWORKINCOMPTHREE           = '#RELWORKINCOMPTHREE#'>	
			<cfset RELWORKINAFINITYTHREE        = '#RELWORKINAFINITYTHREE#'>
			
	</cfloop>
			
			<cfif (RELWORKINNAMEONE NEQ "") AND (RELWORKINNAMEONE NEQ "NA") AND (RELWORKINNAMEONE NEQ "N/A")>
			
			<cfquery name="insert_to_CIN21RELATIVE" datasource="#client.company_dsn#">
                    
					INSERT INTO CIN21RELATIVE   (  GUID,
												   PERSONNELIDNO,
												   NAME,
												   COMPANY,
												   POSITION
												 )
									   VALUES    ( <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
												   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
												   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#RELWORKINNAMEONE#" >,
												   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#RELWORKINCOMPONE#" >,
												   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#RELWORKINAFINITYONE#" >															 
												 );                
					  
			</cfquery>
			
			<cfelse>
                    
            </cfif>
			
			
			
			
			<cfif (RELWORKINNAMETWO NEQ "") AND (RELWORKINNAMETWO NEQ "NA") AND (RELWORKINNAMETWO NEQ "N/A")>
			
			<cfquery name="insert_to_CIN21RELATIVE" datasource="#client.company_dsn#">
                    
					INSERT INTO CIN21RELATIVE   (  GUID,
												   PERSONNELIDNO,
												   NAME,
												   COMPANY,
												   POSITION
												 )
									   VALUES    ( <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
												   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
												   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#RELWORKINNAMETWO#" >,
												   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#RELWORKINCOMPTWO#" >,
												   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#RELWORKINAFINITYTWO#" >															 
												 );                
					  
			</cfquery>
			
			<cfelse>
                    
            </cfif>
			
			
			
			
			<cfif (RELWORKINNAMETHREE NEQ "") AND (RELWORKINNAMETHREE NEQ "NA") AND (RELWORKINNAMETHREE NEQ "N/A")>
			
			<cfquery name="insert_to_CIN21RELATIVE" datasource="#client.company_dsn#">
                    
					INSERT INTO CIN21RELATIVE   (  GUID,
												   PERSONNELIDNO,
												   NAME,
												   COMPANY,
												   POSITION
												 )
									   VALUES    ( <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
												   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
												   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#RELWORKINNAMETHREE#" >,
												   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#RELWORKINCOMPTHREE#" >,
												   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#RELWORKINAFINITYTHREE#" >															 
												 );                
					  
			</cfquery>
			
			<cfelse>
                    
            </cfif>
			
			
	
 
 
 <!---End Relatives friends working in Filinvet--->


<!--- Special Skills CIN21MISCINFO1--->

    <cfloop query="query_from_grgpool">
                    
			<cfset SPECIALSKILLSONE           = '#SPECIALSKILLSONE#'>	
			<cfset SPECIALSKILLSYEARSPONE     = '#SPECIALSKILLSYEARSPONE#'>	
			<cfset SPECIALSKILLSLEVELONE      = '#SPECIALSKILLSLEVELONE#'>
			
	</cfloop>
	
	<cfif (SPECIALSKILLSONE NEQ "") AND (SPECIALSKILLSONE NEQ "NA") AND (SPECIALSKILLSONE NEQ "N/A")>
			
	<cfquery name="insert_to_CIN21MISCINFO1" datasource="#client.company_dsn#">
			
			INSERT INTO CIN21MISCINFO1  (  GUID,
										   PERSONNELIDNO,
										   SPECIALTALENTS,
										   CLASSIFICATION,
										   RANKHELD
										 )
							   VALUES    ( <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#SPECIALSKILLSONE#" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#SPECIALSKILLSYEARSPONE#" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#SPECIALSKILLSLEVELONE#" >															 
										 );                
			  
	</cfquery>
	
	<cfelse>
			
	</cfif>
	
	<cfloop query="query_from_grgpool">
                    
			<cfset SPECIALSKILLSTWO           = '#SPECIALSKILLSTWO#'>	
			<cfset SPECIALSKILLSYEARSPTWO     = '#SPECIALSKILLSYEARSPTWO#'>	
			<cfset SPECIALSKILLSLEVELTWO      = '#SPECIALSKILLSLEVELTWO#'>
			
	</cfloop>
	
	<cfif (SPECIALSKILLSTWO NEQ "") AND (SPECIALSKILLSTWO NEQ "NA") AND (SPECIALSKILLSTWO NEQ "N/A")>
			
	<cfquery name="insert_to_CIN21MISCINFO1" datasource="#client.company_dsn#">
			
			INSERT INTO CIN21MISCINFO1  (  GUID,
										   PERSONNELIDNO,
										   SPECIALTALENTS,
										   CLASSIFICATION,
										   RANKHELD
										 )
							   VALUES    ( <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#SPECIALSKILLSTWO#" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#SPECIALSKILLSYEARSPTWO#" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#SPECIALSKILLSLEVELTWO#" >															 
										 );                
			  
	</cfquery>
	
	<cfelse>
			
	</cfif>
	
	<cfloop query="query_from_grgpool">
                    
			<cfset SPECIALSKILLSTHREE           = '#SPECIALSKILLSTHREE#'>	
			<cfset SPECIALSKILLSYEARSPTHREE     = '#SPECIALSKILLSYEARSPTHREE#'>	
			<cfset SPECIALSKILLSLEVELTHREE      = '#SPECIALSKILLSLEVELTHREE#'>
			
	</cfloop>
	
	<cfif (SPECIALSKILLSTHREE NEQ "") AND (SPECIALSKILLSTHREE NEQ "NA") AND (SPECIALSKILLSTHREE NEQ "N/A")>
			
	<cfquery name="insert_to_CIN21MISCINFO1" datasource="#client.company_dsn#">
			
			INSERT INTO CIN21MISCINFO1  (  GUID,
										   PERSONNELIDNO,
										   SPECIALTALENTS,
										   CLASSIFICATION,
										   RANKHELD
										 )
							   VALUES    ( <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#SPECIALSKILLSTHREE#" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#SPECIALSKILLSYEARSPTHREE#" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#SPECIALSKILLSLEVELTHREE#" >															 
										 );                
			  
	</cfquery>
	
	<cfelse>
			
	</cfif>
	
	
	<cfloop query="query_from_grgpool">
                    
			<cfset SPECIALSKILLSFOUR           = '#SPECIALSKILLSFOUR#'>	
			<cfset SPECIALSKILLSYEARSPFOUR     = '#SPECIALSKILLSYEARSPFOUR#'>	
			<cfset SPECIALSKILLSLEVELFOUR      = '#SPECIALSKILLSLEVELFOUR#'>
			
	</cfloop>
	
	<cfif (SPECIALSKILLSFOUR NEQ "") AND (SPECIALSKILLSFOUR NEQ "NA") AND (SPECIALSKILLSFOUR NEQ "N/A")>
			
	<cfquery name="insert_to_CIN21MISCINFO1" datasource="#client.company_dsn#">
			
			INSERT INTO CIN21MISCINFO1  (  GUID,
										   PERSONNELIDNO,
										   SPECIALTALENTS,
										   CLASSIFICATION,
										   RANKHELD
										 )
							   VALUES    ( <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#SPECIALSKILLSFOUR#" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#SPECIALSKILLSYEARSPFOUR#" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#SPECIALSKILLSLEVELFOUR#" >															 
										 );                
			  
	</cfquery>
	
	<cfelse>
			
	</cfif>
	
	
	<cfloop query="query_from_grgpool">
                    
			<cfset SPECIALSKILLSFIVE           = '#SPECIALSKILLSFIVE#'>	
			<cfset SPECIALSKILLSYEARSPFIVE     = '#SPECIALSKILLSYEARSPFIVE#'>	
			<cfset SPECIALSKILLSLEVELFIVE      = '#SPECIALSKILLSLEVELFIVE#'>
			
	</cfloop>
	
	<cfif (SPECIALSKILLSFIVE NEQ "") AND (SPECIALSKILLSFIVE NEQ "NA") AND (SPECIALSKILLSFIVE NEQ "N/A")>
			
	<cfquery name="insert_to_CIN21MISCINFO1" datasource="#client.company_dsn#">
			
			INSERT INTO CIN21MISCINFO1  (  GUID,
										   PERSONNELIDNO,
										   SPECIALTALENTS,
										   CLASSIFICATION,
										   RANKHELD
										 )
							   VALUES    ( <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#SPECIALSKILLSFIVE#" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#SPECIALSKILLSYEARSPFIVE#" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#SPECIALSKILLSLEVELFIVE#" >															 
										 );                
			  
	</cfquery>
	
	<cfelse>
			
	</cfif>
	
<!--- End Special Skills --->


   
    <!---FETCH CIN21CHAREFERENCE--->
    
    <cfset REFERENCENAME1 = '#query_from_grgpool.REFERENCENAME1#'>
    <cfset REFERENCENAME2 = '#query_from_grgpool.REFERENCENAME2#'>
    <cfset REFERENCENAME3 = '#query_from_grgpool.REFERENCENAME3#'>
    
    <cfset REFERENCEOCCUPATION1 = '#query_from_grgpool.REFERENCEOCCUPATION1#'>
    <cfset REFERENCEOCCUPATION2 = '#query_from_grgpool.REFERENCEOCCUPATION2#'>
    <cfset REFERENCEOCCUPATION3 = '#query_from_grgpool.REFERENCEOCCUPATION3#'>
    
    <cfset REFERENCECOMPANY1 = '#query_from_grgpool.REFERENCECOMPANY1#'>
    <cfset REFERENCECOMPANY2 = '#query_from_grgpool.REFERENCECOMPANY2#'>
    <cfset REFERENCECOMPANY3 = '#query_from_grgpool.REFERENCECOMPANY3#'>
    
    <cfset REFERENCECONTACT1 = '#query_from_grgpool.REFERENCECONTACT1#'>
    <cfset REFERENCECONTACT2 = '#query_from_grgpool.REFERENCECONTACT2#'>
    <cfset REFERENCECONTACT3 = '#query_from_grgpool.REFERENCECONTACT3#'>
    
    	<cfif (REFERENCENAME1 NEQ "") AND (REFERENCENAME1 NEQ "NULL") AND (REFERENCENAME1 NEQ "NA") AND (REFERENCENAME1 NEQ "N/A")>
        
        	<cfquery name="insert_to_CIN21CHAREFERENCE" datasource="#client.company_dsn#">
                    
				INSERT INTO  CIN21CHAREFERENCE (   GUID,
												   PERSONNELIDNO,
												   NAME,
												   OCCUPATION,
												   COMPANY,
												   CELLULARPHONE
											 )
										 VALUES ( <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
												  <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
												  <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#REFERENCENAME1#" >,
												  <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#REFERENCEOCCUPATION1#" >,
												  <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#REFERENCECOMPANY1#" >,
												  <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#REFERENCECONTACT1#" >
												 );                
				  
			</cfquery>   
        
        <cfelse>
        
        </cfif>
        
        <cfif (REFERENCENAME2 NEQ "") AND (REFERENCENAME2 NEQ "NULL") AND (REFERENCENAME2 NEQ "NA") AND (REFERENCENAME2 NEQ "N/A")>
        
        	<cfquery name="insert_to_CIN21CHAREFERENCE" datasource="#client.company_dsn#">
                    
					INSERT INTO  CIN21CHAREFERENCE (   GUID,
													   PERSONNELIDNO,
													   NAME,
													   OCCUPATION,
													   COMPANY,
													   CELLULARPHONE
												 )
											 VALUES ( <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
													  <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
													  <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#REFERENCENAME2#" >,
													  <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#REFERENCEOCCUPATION2#" >,
													  <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#REFERENCECOMPANY2#" >,
													  <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#REFERENCECONTACT2#" >
													);                
					  
			</cfquery>   
        
        <cfelse>
        
        </cfif>
        
        <cfif (REFERENCENAME3 NEQ "") AND (REFERENCENAME3 NEQ "NULL") AND (REFERENCENAME3 NEQ "NA") AND (REFERENCENAME3 NEQ "N/A")>
        
        	<cfquery name="insert_to_CIN21CHAREFERENCE" datasource="#client.company_dsn#">
                    
				INSERT INTO  CIN21CHAREFERENCE (   GUID,
												   PERSONNELIDNO,
												   NAME,
												   OCCUPATION,
												   COMPANY,
												   CELLULARPHONE
											 )
										 VALUES ( <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
												  <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
												  <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#REFERENCENAME3#" >,
												  <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#REFERENCEOCCUPATION3#" >,
												  <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#REFERENCECOMPANY3#" >,
												  <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#REFERENCECONTACT3#" >
												);                
				  
		</cfquery>   
        
        <cfelse>
        
        </cfif>
    
    <!---END FETCH CIN21CHAREFERENCE--->
    
 <!---Employment Violations CIN21EMPVIOL--->
 
	<cfloop query="query_from_grgpool">
                    
			<cfset HASPHYSICALDEFFECTS           = '#HASPHYSICALDEFFECTS#'>	
			<cfset HASPHYSICALDEFFECTSNATURE     = '#HASPHYSICALDEFFECTSNATURE#'>
			
			<cfset HASOPILLNESS       			 = '#HASOPILLNESS#'>
			<cfset HASOPILLNESSNATURE      		 = '#HASOPILLNESSNATURE#'>
			
			<cfset HASDRUGSENSITIVE      		 = '#HASDRUGSENSITIVE#'>
			<cfset HASDRUGSENSITIVENATURE      	 = '#HASDRUGSENSITIVENATURE#'>
			
			<cfset HASENGAGEDRUGS      			 = '#HASENGAGEDRUGS#'>
			<cfset HASENGAGEDRUGSNATURE      	 = '#HASENGAGEDRUGSNATURE#'>
			
			<cfset HASINVOLVEBUSI      			 = '#HASINVOLVEBUSI#'>
			<cfset HASINVOLVEBUSINATURE      	 = '#HASINVOLVEBUSINATURE#'>
			
			<cfset HASSUSPENDED     		     = '#HASSUSPENDED#'>
			<cfset HASSUSPENDEDNATURE      		 = '#HASSUSPENDEDNATURE#'>
			
			<cfset HASCRIMINAL      			 = '#HASCRIMINAL#'>
			<cfset HASCRIMINALNATURE      	     = '#HASCRIMINALNATURE#'>
			
	</cfloop>
	
   
    
	<cfquery name="insert_to_CIN21EMPVIOL" datasource="#client.company_dsn#">
			
			INSERT INTO CIN21EMPVIOL    (  GUID,
										   PERSONNELIDNO,
										   CASENUMBER,
										   CASENAME,
										   CASESTATUS
										)
							   VALUES   (  <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "defects" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#HASPHYSICALDEFFECTS#" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#HASPHYSICALDEFFECTSNATURE#" >															 
										);                
			  
	</cfquery>
	 
	<cfquery name="insert_to_CIN21EMPVIOL" datasource="#client.company_dsn#">
			
			INSERT INTO CIN21EMPVIOL    (  GUID,
										   PERSONNELIDNO,
										   CASENUMBER,
										   CASENAME,
										   CASESTATUS
										)
							   VALUES   (  <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "illness" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#HASOPILLNESS#" >,	
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#HASOPILLNESSNATURE#" >															 
										);                
			  
	</cfquery>
	
	<cfquery name="insert_to_CIN21EMPVIOL" datasource="#client.company_dsn#">
			
			INSERT INTO CIN21EMPVIOL    (  GUID,
										   PERSONNELIDNO,
										   CASENUMBER,
										   CASENAME,
										   CASESTATUS
										)
							   VALUES   (  <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "sensitive" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#HASDRUGSENSITIVE#" >,	
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#HASDRUGSENSITIVENATURE#" >															 
										);                
			  
	</cfquery>
	
	<cfquery name="insert_to_CIN21EMPVIOL" datasource="#client.company_dsn#">
			
			INSERT INTO CIN21EMPVIOL    (  GUID,
										   PERSONNELIDNO,
										   CASENUMBER,
										   CASENAME,
										   CASESTATUS
										)
							   VALUES   (  <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "dangerous" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#HASENGAGEDRUGS#" >,	
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#HASENGAGEDRUGSNATURE#" >															 
										);                
			  
	</cfquery>
	
	<cfquery name="insert_to_CIN21EMPVIOL" datasource="#client.company_dsn#">
			
			INSERT INTO CIN21EMPVIOL    (  GUID,
										   PERSONNELIDNO,
										   CASENUMBER,
										   CASENAME,
										   CASESTATUS
										)
							   VALUES   (  <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "business" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#HASINVOLVEBUSI#" >,	
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#HASINVOLVEBUSINATURE#" >															 
										);                
			  
	</cfquery>
	
	<cfquery name="insert_to_CIN21EMPVIOL" datasource="#client.company_dsn#">
			
			INSERT INTO CIN21EMPVIOL    (  GUID,
										   PERSONNELIDNO,
										   CASENUMBER,
										   CASENAME,
										   CASESTATUS
										)
							   VALUES   (  <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "suspended" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#HASSUSPENDED#" >,	
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#HASSUSPENDEDNATURE#" >															 
										);                
			  
	</cfquery>
	
	<cfquery name="insert_to_CIN21EMPVIOL" datasource="#client.company_dsn#">
			
			INSERT INTO CIN21EMPVIOL    (  GUID,
										   PERSONNELIDNO,
										   CASENUMBER,
										   CASENAME,
										   CASESTATUS
										)
							   VALUES   (  <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sValue#" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#sApp#" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "convicted" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#HASCRIMINAL#" >,
										   <cfqueryparam cfsqltype = "cf_sql_varchar" value = "#HASCRIMINALNATURE#" >															 
										);                
			  
	</cfquery>  
 
 <!---End Employment Violations --->

<cfset sourceappnumber = '_' >
<cfset sourcedatasource = '_' >
<cfset sourcerouteidECINEXAMRESULT = '_' >
<cfset sourcerouteidECINTERVIEWRESULT = '_' >
<cfset resultstatus = '_' >
<cfset sourcerouteidECINTERVIEWRESULTFD = '_' >
<cfset sourcerouteidECINTERVIEWRESULTSD = '_' >
<cfset sourcerouteidECINTERVIEWRESULTFINAL = '_' >
<cfset sourcerouteidECINJOBOFFER = '_' >
<cfset sourcerouteidECINREQUIREMENTS = '_' >
<cfset sourcerouteidECINCONTRACT = '_' >



<!--- <cfinvoke component="employment" method="getSourceAppno" returnvariable="sourceappnumber" refcode="#listvaluehere#"/>
 
 
 <cfinvoke component="employment" method="getSourceDatasource" returnvariable="sourcedatasource" refcode="#listvaluehere#"/>
 
 
 <cfinvoke component="employment" 
 		   method="getRouteid" 
           returnvariable="sourcerouteidECINEXAMRESULT" 
           sourceappnum="#sourceappnumber#"
           sourcedatasource="#sourcedatasource#"
           sourcetablename="ECINEXAMRESULT"
           />
 
 
 <cfinvoke component="employment" 
 		   method="moveeformrecord" 
           returnvariable="resultstatus" 
           routeid="#sourcerouteidECINEXAMRESULT#"
           applicatnnumber="#sourceappnumber#"
           sourcedatasource="#sourcedatasource#"
           sourcetablename="ECINEXAMRESULT"
           />
 
 
 
 
 <cfinvoke component="employment" 
 		   method="getRouteid" 
           returnvariable="sourcerouteidECINTERVIEWRESULT" 
           sourceappnum="#sourceappnumber#"
           sourcedatasource="#sourcedatasource#"
           sourcetablename="ECINTERVIEWRESULT"
           />
 
 
 <cfinvoke component="employment" 
 		   method="moveeformrecord" 
           returnvariable="resultstatus" 
           routeid="#sourcerouteidECINTERVIEWRESULT#"
           applicatnnumber="#sourceappnumber#"
           sourcedatasource="#sourcedatasource#"
           sourcetablename="ECINTERVIEWRESULT"
           />
 
 
 
 
 <cfinvoke component="employment" 
 		   method="getRouteid" 
           returnvariable="sourcerouteidECINTERVIEWRESULTFD" 
           sourceappnum="#sourceappnumber#"
           sourcedatasource="#sourcedatasource#"
           sourcetablename="ECINTERVIEWRESULTFD"
           />
 
 
 <cfinvoke component="employment" 
 		   method="moveeformrecord" 
           returnvariable="resultstatus" 
           routeid="#sourcerouteidECINTERVIEWRESULTFD#"
           applicatnnumber="#sourceappnumber#"
           sourcedatasource="#sourcedatasource#"
           sourcetablename="ECINTERVIEWRESULTFD"
           />
 
 
 
 
 <cfinvoke component="employment" 
 		   method="getRouteid" 
           returnvariable="sourcerouteidECINTERVIEWRESULTSD" 
           sourceappnum="#sourceappnumber#"
           sourcedatasource="#sourcedatasource#"
           sourcetablename="ECINTERVIEWRESULTSD"
           />

 
 <cfinvoke component="employment" 
 		   method="moveeformrecord" 
           returnvariable="resultstatus" 
           routeid="#sourcerouteidECINTERVIEWRESULTSD#"
           applicatnnumber="#sourceappnumber#"
           sourcedatasource="#sourcedatasource#"
           sourcetablename="ECINTERVIEWRESULTSD"
           />
 
 
 <cfinvoke component="employment" 
 		   method="getRouteid" 
           returnvariable="sourcerouteidECINTERVIEWRESULTFINAL" 
           sourceappnum="#sourceappnumber#"
           sourcedatasource="#sourcedatasource#"
           sourcetablename="ECINTERVIEWRESULTFINAL"
           />
 
 
 <cfinvoke component="employment" 
 		   method="moveeformrecord" 
           returnvariable="resultstatus" 
           routeid="#sourcerouteidECINTERVIEWRESULTFINAL#"
           applicatnnumber="#sourceappnumber#"
           sourcedatasource="#sourcedatasource#"
           sourcetablename="ECINTERVIEWRESULTFINAL"
           />
 
 
 
 
 <cfinvoke component="employment" 
 		   method="getRouteid" 
           returnvariable="sourcerouteidECINJOBOFFER" 
           sourceappnum="#sourceappnumber#"
           sourcedatasource="#sourcedatasource#"
           sourcetablename="ECINJOBOFFER"
           />

 
 <cfinvoke component="employment" 
 		   method="moveeformrecord" 
           returnvariable="resultstatus" 
           routeid="#sourcerouteidECINJOBOFFER#"
           applicatnnumber="#sourceappnumber#"
           sourcedatasource="#sourcedatasource#"
           sourcetablename="ECINJOBOFFER"
           />
 
 
 
 
 
 <cfinvoke component="employment" 
 		   method="getRouteid" 
           returnvariable="sourcerouteidECINREQUIREMENTS" 
           sourceappnum="#sourceappnumber#"
           sourcedatasource="#sourcedatasource#"
           sourcetablename="CINPREEMPREQCHKLIST"
           />
 
 
 <cfinvoke component="employment" 
 		   method="moveeformrecord" 
           returnvariable="resultstatus" 
           routeid="#sourcerouteidECINREQUIREMENTS#"
           applicatnnumber="#sourceappnumber#"
           sourcedatasource="#sourcedatasource#"
           sourcetablename="CINPREEMPREQCHKLIST"
           />
 
 
 
 <cfinvoke component="employment" 
 		   method="getRouteid" 
           returnvariable="sourcerouteidECINCONTRACT" 
           sourceappnum="#sourceappnumber#"
           sourcedatasource="#sourcedatasource#"
           sourcetablename="ECINCONTRACT"
           />
 
 
 <cfinvoke component="employment" 
 		   method="moveeformrecord" 
           returnvariable="resultstatus" 
           routeid="#sourcerouteidECINCONTRACT#"
           applicatnnumber="#sourceappnumber#"
           sourcedatasource="#sourcedatasource#"
           sourcetablename="ECINCONTRACT"
           />--->
 
		<cfquery name="insertcmfap" datasource="#client.global_dsn#">
    
    		DELETE FROM GRGPOOL
            WHERE REFERENCECODE = '#listvaluehere#';
            
    	</cfquery> 
        
   <cfcatch>
 		<cfoutput>#cfcatch.Detail#</cfoutput>
            
		   <cfset messageback = cfcatch.Detail & ' Message: ' & cfcatch.Message />

			
            <cfquery name="rollback_gmfpeople" datasource="#client.global_dsn#">
                   
                   		DELETE 
						  FROM GMFPEOPLE
                         WHERE GUID = '#sValue#';
                       
            </cfquery>
            
            <cfquery name="rollback_cmfap" datasource="#client.company_dsn#">
                   
                   		DELETE FROM CMFAP
                        WHERE GUID = '#sValue#';
                       
            </cfquery>
            
            <cfquery name="rollback_education" datasource="#client.company_dsn#">
                   
                   		DELETE FROM CIN21EDUCATION
                        WHERE GUID = '#sValue#';
                       
            </cfquery>
            
            <cfquery name="rollback_empextra" datasource="#client.company_dsn#">
                   
                   		DELETE FROM CIN21EMPEXTRA
                        WHERE GUID = '#sValue#';
                       
            </cfquery>
            
            <cfquery name="rollback_exampass" datasource="#client.company_dsn#">
                   
                   		DELETE FROM CIN21EXAMPASS
                        WHERE GUID = '#sValue#';
                       
            </cfquery>
            
            <cfquery name="rollback_familybackground" datasource="#client.company_dsn#">
                   
                   		DELETE FROM CIN21FAMILYBKGRND
                        WHERE GUID = '#sValue#';
                       
            </cfquery>
            
             <cfquery name="rollback_personalinfo" datasource="#client.company_dsn#">
                   
                   		DELETE FROM CIN21PERSONALINFO
                        WHERE GUID = '#sValue#';
                       
            </cfquery>
            
            <cfquery name="rollback_positionapplied" datasource="#client.company_dsn#">
                   
                   		DELETE FROM CIN21POSITNAPLD
                        WHERE GUID = '#sValue#';
                       
            </cfquery>
            
            
            <cfquery name="rollback_training" datasource="#client.company_dsn#">
                   
                   		DELETE FROM CIN21TRAINING
                        WHERE GUID = '#sValue#';
                       
            </cfquery>
            
            
            <cfquery name="rollback_work_history" datasource="#client.company_dsn#">
                   
                   		DELETE FROM CIN21WORKHISTORY
                        WHERE GUID = '#sValue#';
                       
            </cfquery> 
            
            <cfquery name="rollback_work_chareference" datasource="#client.company_dsn#">
                   
                   		DELETE FROM CIN21CHAREFERENCE
                        WHERE GUID = '#sValue#';
                       
            </cfquery> 
            
            <cfquery name="rollback_CIN21ACHIEVEMENTS" datasource="#client.company_dsn#">
                   
                   		DELETE FROM CIN21ACHIEVEMENTS
                        WHERE GUID = '#sValue#';
                       
            </cfquery>
            
            <cfquery name="rollback_CIN21MEDHISTORY" datasource="#client.company_dsn#">
                   
                   		DELETE FROM CIN21MEDHISTORY
                        WHERE GUID = '#sValue#';
                       
            </cfquery>
            
            <cfquery name="rollback_CIN21RELATIVE" datasource="#client.company_dsn#">
                   
                   		DELETE FROM CIN21RELATIVE
                        WHERE GUID = '#sValue#';
                       
            </cfquery>
            
            <cfquery name="rollback_CIN21RELATIVE" datasource="#client.company_dsn#">
                   
                   		DELETE FROM CIN21MISCINFO1
                        WHERE GUID = '#sValue#';
                       
            </cfquery>
            
            <cfquery name="rollback_CIN21EMPVIOL" datasource="#client.company_dsn#">
                   
                   		DELETE FROM CIN21EMPVIOL
                        WHERE GUID = '#sValue#';
                       
            </cfquery>
            
            
            <!---END ROLLBACK here--->
            
   			<cfcontinue>
    
	   </cfcatch>
</cftry> 

 <cfsetting  
    enableCFoutputOnly = "yes"
    showDebugOutput    = "no" >
	
</cfloop>

<cfreturn #messageback# >

</cffunction>

</cfcomponent>